Cleanup eclipse warnings
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / PeerExportGroup.java
index b9c82878987bce113287e8fc4f4128d2d43924f1..ffcf7f8979be9bfdf33fa7322ae9844f472f1a0c 100644 (file)
@@ -8,8 +8,7 @@
 
 package org.opendaylight.protocol.bgp.rib.spi;
 
-import java.util.Collection;
-import java.util.Map;
+import java.util.function.BiConsumer;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerRole;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -29,25 +28,34 @@ public interface PeerExportGroup {
         }
 
         public YangInstanceIdentifier getYii() {
-            return yii;
+            return this.yii;
         }
 
         public PeerRole getRole() {
-            return role;
+            return this.role;
         }
     }
 
     /**
      * Transform outgoing attributes according to policy per Peer
      *
-     * @param sourcePeerId root Peer
+     * @param role root Peer role
      * @param attributes attributes container
      * @return return attributes container after apply policy
      */
-    ContainerNode effectiveAttributes(PeerId sourcePeerId, ContainerNode attributes);
+    ContainerNode effectiveAttributes(PeerRole role, ContainerNode attributes);
 
     /**
-     * @return map of peer
+     *
+     * @param routePeerId PeerId
+     * @return true if peer is present on this export group
+     */
+    boolean containsPeer(PeerId routePeerId);
+
+    /**
+     * Applies the given action for each entry in this PeerExportGroup on synchronized mode
+     *
+     * @param action action to be applied
      */
-    Collection<Map.Entry<PeerId, PeerExporTuple>> getPeers();
+    void forEach(BiConsumer<PeerId, YangInstanceIdentifier> action);
 }