8d0ce85a823f71b0ca7adc103c6afbdc480a9168
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / CacheDisconnectedPeers.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 package org.opendaylight.protocol.bgp.rib.spi;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
12
13 public interface CacheDisconnectedPeers {
14
15     /**
16      * Check whether Peer is inside the cache List
17      *
18      * @param peerId of destination peer
19      * @return True if peer is contained on CacheList
20      */
21     boolean isPeerDisconnected(PeerId peerId);
22
23     /**
24      * Remove Peer from cache in case of reconnection
25      *
26      * @param peerId of reconnected peer
27      */
28     void reconnected(PeerId peerId);
29
30     /**
31      * Add to cache list disconnected peer
32      *
33      * @param peerId of disconnected peer
34      */
35     void insertDesconectedPeer(Ipv4Address peerId);
36 }