Fix BGP operational state
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / state / BGPRibState.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 java.util.Map;
11 import org.eclipse.jdt.annotation.NonNull;
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.AsNumber;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpId;
16
17 /**
18  * Representing RIB Operational State information.
19  * -PeerGroup States.
20  * Total Paths / Total Prefixes counters, representing the paths / prefixes installed on Loc-rib
21  */
22 public interface BGPRibState extends RibReference {
23     /**
24      * Indicates whether this instance is being actively managed and updated.
25      *
26      * @return active
27      */
28     boolean isActive();
29
30     /**
31      * Prefixes count per tablesKey Type.
32      *
33      * @return Prefixes count
34      */
35     @NonNull Map<TablesKey, Long> getTablesPrefixesCount();
36
37     /**
38      * Mapped Total Paths Count per TableKey.
39      *
40      * @return Prefixes count
41      */
42     @NonNull Map<TablesKey, Long> getPathsCount();
43
44     /**
45      * Total Paths Installed.
46      *
47      * @return count
48      */
49     long getTotalPathsCount();
50
51     /**
52      * Total Prefixes Installed.
53      *
54      * @return count
55      */
56     long getTotalPrefixesCount();
57
58     /**
59      * Total Path Installed per specific TableKey.
60      *
61      * @param tablesKey table key
62      * @return count
63      */
64     long getPathCount(TablesKey tablesKey);
65
66     /**
67      * Total Prefixes Installed per specific TableKey.
68      *
69      * @param tablesKey table key
70      * @return count
71      */
72     long getPrefixesCount(TablesKey tablesKey);
73
74     /**
75      * AS.
76      *
77      * @return as
78      */
79     @NonNull AsNumber getAs();
80
81     /**
82      * BGP identifier.
83      *
84      * @return BGP identifier
85      */
86     @NonNull BgpId getRouteId();
87 }
88