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