Provide Add Path support for all AFI/SAFI
[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
9 package org.opendaylight.protocol.bgp.rib.spi.state;
10
11 import javax.annotation.Nonnull;
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 public interface BGPGracelfulRestartState {
18     /**
19      * is Graceful Restart Supported advertized to neighbor.
20      *
21      * @param tablesKey tables Key
22      * @return true if Afi Safi was advertized to neighbor
23      */
24     boolean isGracefulRestartAdvertized(@Nonnull TablesKey tablesKey);
25
26     /**
27      * is Graceful Restart Supported advertized by neighbor.
28      *
29      * @param tablesKey tables Key
30      * @return true if Afi Safi was advertized by neighbor
31      */
32     boolean isGracefulRestartReceived(@Nonnull TablesKey tablesKey);
33
34     /**
35      * This flag indicates whether the local neighbor is currently restarting.
36      *
37      * @return local restarting state
38      */
39     boolean isLocalRestarting();
40
41     /**
42      * The period of time (advertised by the peer) that the peer expects a restart of a
43      * BGP session to take.
44      *
45      * @return time
46      */
47     int getPeerRestartTime();
48
49     /**
50      * This flag indicates whether the remote neighbor is currently in the process of
51      * restarting, and hence received routes are currently stale.
52      *
53      * @return peer is restarting
54      */
55     boolean isPeerRestarting();
56 }