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