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 javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerRole;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
19 * Tracks peers for adj-rib-out writeout.
21 public interface ExportPolicyPeerTracker {
23 * Update set with supported tables per peer
24 * @param peerId which receveid the change
25 * @param node data change
27 void onTablesChanged(PeerId peerId, DataTreeCandidateNode node);
30 * returns PeerExportGroup per role
31 * @param role of desired PeerExportGroup
32 * @return PeerExportGroup
34 PeerExportGroup getPeerGroup(PeerRole role);
37 * check whether the peer supports the table
38 * @param peerId of peer
39 * @return true if peer supports table
41 boolean isTableSupported(PeerId peerId);
44 * @param peerId of peer
45 * @return Role of peer
47 PeerRole getRole(YangInstanceIdentifier peerId);
50 * Check whether Peer supports Add Path
52 * @return true if add-path is supported
54 boolean isAddPathSupportedByPeer(PeerId peerId);
57 * Invoked whenever a peer role changes.
59 * @param peerPath Peer's path
60 * @param role Peer's new role, null indicates the peer has disappeared.
62 void peerRoleChanged(@Nonnull YangInstanceIdentifier peerPath, @Nullable PeerRole role);