BUG 2185 : Introduce the SwitchBehavior message
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / behaviors / RaftActorBehavior.java
index d04dec030bbdcf65176e3f299b9da32597cc2ff8..b0a7638b92abdec6aef770cc6170a5c5353cc434 100644 (file)
@@ -65,4 +65,13 @@ public interface RaftActorBehavior extends AutoCloseable{
      * @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
+     */
+    RaftActorBehavior switchBehavior(RaftActorBehavior behavior);
 }