BUG-8898: prioritize InternalCommand 35/60935/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 31 Jul 2017 14:08:22 +0000 (16:08 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 1 Aug 2017 11:47:55 +0000 (11:47 +0000)
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>
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.
      *