@Beta @ThreadSafe public class ClientActorContext extends Object implements org.opendaylight.yangtools.concepts.Identifiable<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() |
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) |
ClientIdentifier |
getIdentifier() |
MessageSlicer |
messageSlicer() |
akka.actor.ActorRef |
self() |
com.google.common.base.Ticker |
ticker()
Return the time ticker for this
ClientActorContext . |
@Nonnull public ClientIdentifier getIdentifier()
getIdentifier
in interface org.opendaylight.yangtools.concepts.Identifiable<ClientIdentifier>
@Nonnull public ClientActorConfig config()
@Nonnull public Dispatchers dispatchers()
@Nonnull public 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 © 2019 OpenDaylight. All rights reserved.