Get rid of JSR305 annotations
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / state / BGPPeerState.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.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.IpAddress;
14
15 /**
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
24  */
25 public interface BGPPeerState extends RibReference {
26     /**
27      * Indicates whether this instance is being actively managed and updated.
28      *
29      * @return active
30      */
31     boolean isActive();
32
33     /**
34      * PeerGroup Id.
35      *
36      * @return PeerGroup Id
37      */
38     @Nullable String getGroupId();
39
40     /**
41      * Return Neighbor Key/Address.
42      *
43      * @return neighbor Address
44      */
45     @NonNull IpAddress getNeighborAddress();
46
47     /**
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
51      *
52      * @return Paths counter
53      */
54     default long getTotalPathsCount() {
55         return getTotalPrefixes();
56     }
57
58     /**
59      * Prefixes installed under Effective-Rib-In for a BGP neighbor.
60      *
61      * @return Paths counter
62      */
63     long getTotalPrefixes();
64
65     /**
66      * Error Handling State.
67      *
68      * @return ErrorHandlingState
69      */
70     @NonNull BGPErrorHandlingState getBGPErrorHandlingState();
71
72     /**
73      * Afi Safi Operational State.
74      *
75      * @return AfiSafiState
76      */
77     @NonNull BGPAfiSafiState getBGPAfiSafiState();
78
79     /**
80      * BGP Session Operational State.
81      *
82      * @return BGPSessionState
83      */
84     @Nullable BGPSessionState getBGPSessionState();
85
86     /**
87      * BGP Message Operational State.
88      *
89      * @return BGPPeerMessagesState
90      */
91     @Nullable BGPPeerMessagesState getBGPPeerMessagesState();
92
93     /**
94      * BGP Operation Timers State.
95      *
96      * @return BGPTimersState
97      */
98     @Nullable BGPTimersState getBGPTimersState();
99
100     /**
101      * BGP Operational Transport State.
102      *
103      * @return BGPTransportState
104      */
105     @Nullable BGPTransportState getBGPTransportState();
106
107     /**
108      * BGP Operational GracelfulRestart State.
109      *
110      * @return BGPGracelfulRestartState
111      */
112     @NonNull BGPGracelfulRestartState getBGPGracelfulRestart();
113 }