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.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;
22 * Tracks peers for adj-rib-out writeout.
24 public interface ExportPolicyPeerTracker {
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
33 AbstractRegistration registerPeer(@Nonnull PeerId peerId, @Nullable SendReceive sendReceive,
34 @Nonnull YangInstanceIdentifier peerPath, @Nonnull PeerRole peerRole,
35 @Nonnull Optional<SimpleRoutingPolicy> simpleRoutingPolicy);
38 * returns PeerExportGroup per role
39 * @param role of desired PeerExportGroup
40 * @return PeerExportGroup
42 PeerExportGroup getPeerGroup(@Nonnull PeerRole role);
45 * check whether the peer supports the table
46 * @param peerId of peer
47 * @return true if peer supports table
49 boolean isTableSupported(@Nonnull PeerId peerId);
52 * @param peerId of peer
53 * @return Role of peer
55 PeerRole getRole(@Nonnull YangInstanceIdentifier peerId);
58 * Check whether Peer supports Add Path
59 * @param peerId of peer
60 * @return true if add-path is supported
62 boolean isAddPathSupportedByPeer(@Nonnull PeerId peerId);
65 * Flags peers once empty structure has been created, then changes under it can
68 * @param peerId of peer
70 void registerPeerAsInitialized(PeerId peerId);
73 * check whether the peer supports the table
74 * @param peerId of peer
75 * @return true if peer supports table
77 boolean isTableStructureInitialized(@Nonnull PeerId peerId);