2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.protocol.bgp.rib.spi;
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.rev171207.SendReceive;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.PeerId;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.PeerRole;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.SimpleRoutingPolicy;
19 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
22 * Tracks peers for adj-rib-out writeout.
24 public interface ExportPolicyPeerTracker {
28 * @param peerId Peer Id
29 * @param sendReceive send receive add ath configuration of the peer
30 * @param peerPath Yii of the peer
31 * @param peerRole Role of the peer
32 * @param simpleRoutingPolicy optional
35 AbstractRegistration registerPeer(@Nonnull PeerId peerId, @Nullable SendReceive sendReceive,
36 @Nonnull YangInstanceIdentifier peerPath, @Nonnull PeerRole peerRole,
37 @Nonnull Optional<SimpleRoutingPolicy> simpleRoutingPolicy);
40 * Returns PeerExportGroup per role.
42 * @param role of desired PeerExportGroup
43 * @return PeerExportGroup
46 PeerExportGroup getPeerGroup(@Nonnull PeerRole role);
49 * Check whether the peer supports the table.
51 * @param peerId of peer
52 * @return true if peer supports table
54 boolean isTableSupported(@Nonnull PeerId peerId);
57 * Returns roles per PeerID.
59 * @param peerId of peer
60 * @return Role of peer
63 PeerRole getRole(@Nonnull YangInstanceIdentifier peerId);
66 * Check whether Peer supports Add Path.
68 * @param peerId of peer
69 * @return true if add-path is supported
71 boolean isAddPathSupportedByPeer(@Nonnull PeerId peerId);
74 * Flags peers once empty structure has been created, then changes under it can
77 * @param peerId of peer
79 void registerPeerAsInitialized(@Nonnull PeerId peerId);
82 * Check whether the peer supports the table.
84 * @param peerId of peer
85 * @return true if peer supports table
87 boolean isTableStructureInitialized(@Nonnull PeerId peerId);