Simplify isolated leader check
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorContext.java
index b20e9daa945cee3e14cb0181be72317808b8afc0..267a4d2b7e995894d8feb7a36261f24653d59e74 100644 (file)
@@ -17,6 +17,7 @@ import com.google.common.base.Supplier;
 import java.util.Collection;
 import javax.annotation.Nullable;
 import org.opendaylight.controller.cluster.DataPersistenceProvider;
+import org.opendaylight.controller.cluster.raft.behaviors.RaftActorBehavior;
 import org.opendaylight.controller.cluster.raft.policy.RaftPolicy;
 import org.slf4j.Logger;
 
@@ -235,5 +236,15 @@ public interface RaftActorContext {
      * @return the RaftActor's peer information as a ServerConfigurationPayload if the
      * dynamic server configurations are available, otherwise returns null
      */
-    @Nullable ServerConfigurationPayload getPeerServerInfo();
+    @Nullable ServerConfigurationPayload getPeerServerInfo(boolean includeSelf);
+
+    /**
+     * @return true if this RaftActor is a voting member of the cluster, false otherwise.
+     */
+    boolean isVotingMember();
+
+    /**
+     * @return current behavior attached to the raft actor.
+     */
+    RaftActorBehavior getCurrentBehavior();
 }