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.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.protocol.bgp.rib.RibReference;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone;
16 * Representing operational state related to a particular BGP neighbor.
17 * - Counters for BGP messages sent and received from the neighbor
18 * - Operational state of timers associated with the BGP neighbor
19 * - Operational state of the transport session associated with the BGP neighbor
20 * - Operational state of the error handling associated with the BGP neighbor
21 * - Operational state of graceful-restart associated with a BGP neighbor
22 * - Per-AFI-SAFI operational state and counters to the BGP neighbor
23 * - Per-AFI-SAFI operational state for BGP graceful-restart
25 public interface BGPPeerState extends RibReference {
27 * Indicates whether this instance is being actively managed and updated.
36 * @return PeerGroup Id
38 @Nullable String getGroupId();
41 * Return Neighbor Key/Address.
43 * @return neighbor Address
45 @NonNull IpAddressNoZone getNeighborAddress();
48 * Paths installed under Effective-Rib-In for a BGP neighbor.
49 * Represented per Prefixes, the cost of calculate paths per each Prefix on Effective-Rib-in is not worth
50 * at this point, check comment under incrementPrefixesInstalled
52 * @return Paths counter
54 default long getTotalPathsCount() {
55 return getTotalPrefixes();
59 * Prefixes installed under Effective-Rib-In for a BGP neighbor.
61 * @return Paths counter
63 long getTotalPrefixes();
66 * Error Handling State.
68 * @return ErrorHandlingState
70 @NonNull BGPErrorHandlingState getBGPErrorHandlingState();
73 * Afi Safi Operational State.
75 * @return AfiSafiState
77 @NonNull BGPAfiSafiState getBGPAfiSafiState();
80 * BGP Session Operational State.
82 * @return BGPSessionState
84 @Nullable BGPSessionState getBGPSessionState();
87 * BGP Message Operational State.
89 * @return BGPPeerMessagesState
91 @Nullable BGPPeerMessagesState getBGPPeerMessagesState();
94 * BGP Operation Timers State.
96 * @return BGPTimersState
98 @Nullable BGPTimersState getBGPTimersState();
101 * BGP Operational Transport State.
103 * @return BGPTransportState
105 @Nullable BGPTransportState getBGPTransportState();
108 * BGP Operational GracelfulRestart State.
110 * @return BGPGracelfulRestartState
112 @NonNull BGPGracelfulRestartState getBGPGracelfulRestart();