2 * Copyright (c) 2018 AT&T Intellectual Property. 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.List;
13 import javax.annotation.Nonnull;
14 import javax.annotation.Nullable;
15 import org.opendaylight.protocol.concepts.AbstractRegistration;
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.rib.TablesKey;
21 * Tracks Peers under RIB.
23 public interface BGPPeerTracker {
28 * @return registration tickets
30 AbstractRegistration registerPeer(@Nonnull Peer peer);
35 * @param peerId peer ID
39 Peer getPeer(@Nonnull PeerId peerId);
42 * Returns map of PeerId per PeerRole.
43 * Role with none peerId will be filtered.
45 * @return Returns map of Peer group by PeerRole
48 List<Peer> getPeers();