Get rid of JSR305 annotations
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / state / BGPGracelfulRestartState.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.bgp.rib.spi.state;
9
10 import org.eclipse.jdt.annotation.NonNullByDefault;
11 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.operational.rev151009.BgpAfiSafiGracefulRestartState.Mode;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
13
14 /**
15  * BGP Operational Graceful Restart State.
16  */
17 @NonNullByDefault
18 public interface BGPGracelfulRestartState {
19     /**
20      * is Graceful Restart Supported advertized to neighbor.
21      *
22      * @param tablesKey tables Key
23      * @return true if Afi Safi was advertized to neighbor
24      */
25     boolean isGracefulRestartAdvertized(TablesKey tablesKey);
26
27     /**
28      * is Graceful Restart Supported advertized by neighbor.
29      *
30      * @param tablesKey tables Key
31      * @return true if Afi Safi was advertized by neighbor
32      */
33     boolean isGracefulRestartReceived(TablesKey tablesKey);
34
35     /**
36      * This flag indicates whether the local neighbor is currently restarting.
37      *
38      * @return local restarting state
39      */
40     boolean isLocalRestarting();
41
42     /**
43      * The period of time (advertised by the peer) that the peer expects a restart of a
44      * BGP session to take.
45      *
46      * @return time
47      */
48     int getPeerRestartTime();
49
50     /**
51      * This flag indicates whether the remote neighbor is currently in the process of
52      * restarting, and hence received routes are currently stale.
53      *
54      * @return peer is restarting
55      */
56     boolean isPeerRestarting();
57
58     /**
59      * Returns operational mode of graceful restart. Result depends on advertising
60      * and receiving graceful restart capability to/from peer.
61      *
62      * @return graceful restart operational mode
63      */
64     Mode getMode();
65 }