BUG-8898: prioritize InternalCommand
[controller.git] / opendaylight / md-sal / cds-access-client / src / main / java / org / opendaylight / controller / cluster / access / client / InternalCommand.java
index 2b773ca12ba13afe76a9f89fe64c8b1dcc41cdcb..c841f1350a0505c16ce180c05d7031dee09bd674 100644 (file)
@@ -7,22 +7,23 @@
  */
 package org.opendaylight.controller.cluster.access.client;
 
+import akka.dispatch.ControlMessage;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 /**
  * This interface is used to pass the unit of work via the actors mailbox. The command can alter behavior of the actor
- * by returning a new behavior.
+ * by returning a new behavior. This work will be prioritized before other messages.
  *
  * @author Robert Varga
  */
 @FunctionalInterface
-public interface InternalCommand {
+public interface InternalCommand<T extends BackendInfo> extends ControlMessage {
     /**
      * Run command actions.
      *
      * @param currentBehavior Current Behavior
      * @return Next behavior to use in the client actor
      */
-    @Nullable ClientActorBehavior execute(@Nonnull ClientActorBehavior currentBehavior);
+    @Nullable ClientActorBehavior<T> execute(@Nonnull ClientActorBehavior<T> currentBehavior);
 }