X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2Fclient%2FClientActorContext.java;h=26e68356d3f4404e7050bcbcc905542dc6eccb18;hp=e8993c0ee70d0b6fa51459b65ec6b7dc650c225e;hb=314d5b41ea6b464db939da95a33c872f594ccada;hpb=5464f50be733df1bbbe31cf05665d542d3b7c5e7 diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java index e8993c0ee7..26e68356d3 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java @@ -31,6 +31,7 @@ import scala.concurrent.duration.FiniteDuration; /** * An actor context associated with this {@link AbstractClientActor}. * + *

* Time-keeping in a client actor is based on monotonic time. The precision of this time can be expected to be the * same as {@link System#nanoTime()}, but it is not tied to that particular clock. Actor clock is exposed as * a {@link Ticker}, which can be obtained via {@link #ticker()}. @@ -57,7 +58,8 @@ public class ClientActorContext extends AbstractClientActorContext implements Id } @Override - public @Nonnull ClientIdentifier getIdentifier() { + @Nonnull + public ClientIdentifier getIdentifier() { return identifier; } @@ -68,7 +70,8 @@ public class ClientActorContext extends AbstractClientActorContext implements Id * * @return Client actor time source */ - public @Nonnull Ticker ticker() { + @Nonnull + public Ticker ticker() { return Ticker.systemTicker(); } @@ -77,11 +80,11 @@ public class ClientActorContext extends AbstractClientActorContext implements Id * * @param command Block of code which needs to be execute */ - public void executeInActor(final @Nonnull InternalCommand command) { + public void executeInActor(@Nonnull final InternalCommand command) { self().tell(Preconditions.checkNotNull(command), ActorRef.noSender()); } - public Cancellable executeInActor(final @Nonnull InternalCommand command, final FiniteDuration delay) { + public Cancellable executeInActor(@Nonnull final InternalCommand command, final FiniteDuration delay) { return scheduler.scheduleOnce(Preconditions.checkNotNull(delay), self(), Preconditions.checkNotNull(command), executionContext, ActorRef.noSender()); }