Merge "Created Network Service Functions Features"
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorContext.java
index 4bc9162fb5d0811d8f7cba3642b0ca98fe1e1110..7150ec0e6e8fd889f383a4aaace4b250a44061bc 100644 (file)
@@ -12,6 +12,9 @@ import akka.actor.ActorRef;
 import akka.actor.ActorSelection;
 import akka.actor.ActorSystem;
 import akka.actor.Props;
+import akka.event.LoggingAdapter;
+
+import java.util.Map;
 
 /**
  * The RaftActorContext contains that portion of the RaftActors state that
@@ -91,4 +94,36 @@ public interface RaftActorContext {
      * @return The ActorSystem associated with this context
      */
     ActorSystem getActorSystem();
+
+    /**
+     *
+     * @return
+     */
+    LoggingAdapter getLogger();
+
+    /**
+     * Get a mapping of peer id's their addresses
+     * @return
+     */
+    Map<String, String> getPeerAddresses();
+
+    /**
+     *
+     * @param peerId
+     * @return
+     */
+    String getPeerAddress(String peerId);
+
+    /**
+     * Add to actor peers
+     * @param name
+     * @param address
+     */
+    void addToPeers(String name, String address);
+
+    /**
+     *
+     * @param name
+     */
+    public void removePeer(String name);
 }