@Beta @ThreadSafe public class ClientActorContext extends Object implements org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.controller.cluster.access.concepts.ClientIdentifier>
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 System.nanoTime(), but it is not tied to that particular clock. Actor clock is exposed as
a Ticker, which can be obtained via ticker().
| Modifier and Type | Method and Description |
|---|---|
ClientActorConfig |
config() |
org.opendaylight.controller.cluster.common.actor.Dispatchers |
dispatchers() |
<T extends BackendInfo> |
executeInActor(InternalCommand<T> command)
Execute a command in the context of the client actor.
|
<T extends BackendInfo> |
executeInActor(InternalCommand<T> command,
scala.concurrent.duration.FiniteDuration delay) |
org.opendaylight.controller.cluster.access.concepts.ClientIdentifier |
getIdentifier() |
org.opendaylight.controller.cluster.messaging.MessageSlicer |
messageSlicer() |
akka.actor.ActorRef |
self() |
com.google.common.base.Ticker |
ticker()
Return the time ticker for this
ClientActorContext. |
@Nonnull public org.opendaylight.controller.cluster.access.concepts.ClientIdentifier getIdentifier()
getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.controller.cluster.access.concepts.ClientIdentifier>@Nonnull public ClientActorConfig config()
@Nonnull public org.opendaylight.controller.cluster.common.actor.Dispatchers dispatchers()
@Nonnull public org.opendaylight.controller.cluster.messaging.MessageSlicer messageSlicer()
@Nonnull public com.google.common.base.Ticker ticker()
ClientActorContext. This should be used for in all time-tracking
done within a client actor. Subclasses of ClientActorBehavior are encouraged to use
Stopwatch.public <T extends BackendInfo> void executeInActor(@Nonnull InternalCommand<T> command)
T - BackendInfo typecommand - Block of code which needs to be executepublic <T extends BackendInfo> akka.actor.Cancellable executeInActor(@Nonnull InternalCommand<T> command, scala.concurrent.duration.FiniteDuration delay)
@Nonnull public final akka.actor.ActorRef self()
Copyright © 2018 OpenDaylight. All rights reserved.