BUG-8898: prioritize InternalCommand 81/60981/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 31 Jul 2017 14:08:22 +0000 (16:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 1 Aug 2017 12:07:58 +0000 (14:07 +0200)
InternalCommand requests should be processed as soon as possible,
and since we are already using ControlAwareMailbox, this is as simple
as marking InternalCommand as a ControlMessage.

Change-Id: Ic6025f4254da47801676c0c474d03e18abbf8f50
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2ac32ea2c4f57993a1dc49ef8ce380cb03acc822)

opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InternalCommand.java

index f34a4751687cbac927b4ddf6e575426297088037..c841f1350a0505c16ce180c05d7031dee09bd674 100644 (file)
@@ -7,17 +7,18 @@
  */
 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<T extends BackendInfo> {
+public interface InternalCommand<T extends BackendInfo> extends ControlMessage {
     /**
      * Run command actions.
      *