Allow AbstractClientActor generation to start from non-zero
[controller.git] / opendaylight / md-sal / cds-access-client / src / main / java / org / opendaylight / controller / cluster / access / client / InternalCommand.java
index 2b773ca12ba13afe76a9f89fe64c8b1dcc41cdcb..08735529d8f3276f2f6996eb109adc3112422c07 100644 (file)
@@ -7,22 +7,23 @@
  */
 package org.opendaylight.controller.cluster.access.client;
 
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import akka.dispatch.ControlMessage;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.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);
 }