X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Factors%2Fclient%2FClientActorContext.java;h=3aa1a5200b077f91fda048ba2704648de98c8f88;hp=9fc17b53fc4d87ece7f88a46f2d63d1453816175;hb=520c692c4a35fad2ac10e87314e44c07c15b6aaa;hpb=d8bc95c84030468dfe7d04b72499d798dd374331 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorContext.java index 9fc17b53fc..3aa1a5200b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/ClientActorContext.java @@ -49,4 +49,13 @@ public class ClientActorContext extends AbstractClientActorContext implements Id public @Nonnull Ticker ticker() { return Ticker.systemTicker(); } + + /** + * Execute a command in the context of the client actor. + * + * @param command Block of code which needs to be execute + */ + public void executeInActor(final @Nonnull InternalCommand command) { + self().tell(Preconditions.checkNotNull(command), ActorRef.noSender()); + } }