Cleanup eclipse warnings
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / ExportPolicyPeerTracker.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;
10
11 import java.util.Optional;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.protocol.concepts.AbstractRegistration;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.SendReceive;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerRole;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.SimpleRoutingPolicy;
19 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
20
21 /**
22  * Tracks peers for adj-rib-out writeout.
23  */
24 public interface ExportPolicyPeerTracker {
25     /**
26      * Register Peer
27      * @param peerId Peer Id
28      * @param sendReceive send receive add ath configuration of the peer
29      * @param peerPath Yii of the peer
30      * @param peerRole Role of the peer
31      * @param simpleRoutingPolicy
32      */
33     AbstractRegistration registerPeer(@Nonnull PeerId peerId, @Nullable SendReceive sendReceive,
34             @Nonnull YangInstanceIdentifier peerPath, @Nonnull PeerRole peerRole,
35         @Nonnull Optional<SimpleRoutingPolicy> simpleRoutingPolicy);
36
37     /**
38      * returns PeerExportGroup per role
39      * @param role of desired PeerExportGroup
40      * @return PeerExportGroup
41      */
42     PeerExportGroup getPeerGroup(@Nonnull PeerRole role);
43
44     /**
45      * check whether the peer supports the table
46      * @param peerId of peer
47      * @return true if peer supports table
48      */
49     boolean isTableSupported(@Nonnull PeerId peerId);
50
51     /**
52      * @param peerId of peer
53      * @return Role of peer
54      */
55     PeerRole getRole(@Nonnull YangInstanceIdentifier peerId);
56
57     /**
58      * Check whether Peer supports Add Path
59      * @param peerId of peer
60      * @return true if add-path is supported
61      */
62     boolean isAddPathSupportedByPeer(@Nonnull PeerId peerId);
63
64     /**
65      * Flags peers once empty structure has been created, then changes under it can
66      * be applied
67      *
68      * @param peerId of peer
69      */
70     void registerPeerAsInitialized(PeerId peerId);
71
72     /**
73      * check whether the peer supports the table
74      * @param peerId of peer
75      * @return true if peer supports table
76      */
77     boolean isTableStructureInitialized(@Nonnull PeerId peerId);
78 }