X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbehaviors%2FRaftActorBehavior.java;h=b766e0ce39fe9be1b847f54c625c802d036a7a0a;hp=ca2d916ecf619ae61b8b627c2e10181d075a187a;hb=74a7fe23a2fb58d7971b43f5b16a1481dc74966d;hpb=b66641aff093e1e2ac0719aba6b0194c2fd48e36 diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/RaftActorBehavior.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/RaftActorBehavior.java index ca2d916ecf..b766e0ce39 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/RaftActorBehavior.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/RaftActorBehavior.java @@ -25,17 +25,18 @@ import org.opendaylight.controller.cluster.raft.RaftState; * differently. */ public interface RaftActorBehavior extends AutoCloseable{ + /** * Handle a message. If the processing of the message warrants a state - * change then a new state should be returned otherwise this method should - * return the state for the current behavior. + * change then a new behavior should be returned otherwise this method should + * return the current behavior. * * @param sender The sender of the message * @param message A message that needs to be processed * - * @return The new state or self (this) + * @return The new behavior or current behavior */ - RaftState handleMessage(ActorRef sender, Object message); + RaftActorBehavior handleMessage(ActorRef sender, Object message); /** * The state associated with a given behavior @@ -49,4 +50,16 @@ public interface RaftActorBehavior extends AutoCloseable{ * @return */ String getLeaderId(); + + /** + * setting the index of the log entry which is replicated to all nodes + * @param replicatedToAllIndex + */ + void setReplicatedToAllIndex(long replicatedToAllIndex); + + /** + * getting the index of the log entry which is replicated to all nodes + * @return + */ + long getReplicatedToAllIndex(); }