+ * @return The new behavior or current behavior
+ */
+ RaftActorBehavior handleMessage(ActorRef sender, Object message);
+
+ /**
+ *
+ * @return The state associated with a given behavior
+ */
+ RaftState state();
+
+ /**
+ *
+ * @return The Id of the Leader if known else null
+ */
+ String getLeaderId();
+
+ /**
+ * setting the index of the log entry which is replicated to all nodes
+ * @param replicatedToAllIndex
+ */
+ void setReplicatedToAllIndex(long replicatedToAllIndex);
+
+ /**
+ * @return the index of the log entry which is replicated to all nodes
+ */
+ long getReplicatedToAllIndex();
+
+ /**
+ * @return the leader's payload data version.
+ */
+ short getLeaderPayloadVersion();
+
+ /**
+ * switchBehavior makes sure that the current behavior is shutdown before it switches to the new
+ * behavior
+ *
+ * @param behavior The new behavior to switch to
+ * @return The new behavior