2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.protocol.bgp.rib.spi.state;
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;
15 * BGP Operational Graceful Restart State.
18 public interface BGPGracelfulRestartState {
20 * is Graceful Restart Supported advertized to neighbor.
22 * @param tablesKey tables Key
23 * @return true if Afi Safi was advertized to neighbor
25 boolean isGracefulRestartAdvertized(TablesKey tablesKey);
28 * is Graceful Restart Supported advertized by neighbor.
30 * @param tablesKey tables Key
31 * @return true if Afi Safi was advertized by neighbor
33 boolean isGracefulRestartReceived(TablesKey tablesKey);
36 * This flag indicates whether the local neighbor is currently restarting.
38 * @return local restarting state
40 boolean isLocalRestarting();
43 * The period of time (advertised by the peer) that the peer expects a restart of a
44 * BGP session to take.
48 int getPeerRestartTime();
51 * This flag indicates whether the remote neighbor is currently in the process of
52 * restarting, and hence received routes are currently stale.
54 * @return peer is restarting
56 boolean isPeerRestarting();
59 * Returns operational mode of graceful restart. Result depends on advertising
60 * and receiving graceful restart capability to/from peer.
62 * @return graceful restart operational mode