Class ClientActorContext
java.lang.Object
org.opendaylight.controller.cluster.access.client.ClientActorContext
- All Implemented Interfaces:
Identifiable<ClientIdentifier>
An actor context associated with this
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(). This class is thread-safe.
-
Method Summary
Modifier and TypeMethodDescription@NonNull ClientActorConfigconfig()@NonNull Dispatchers<T extends BackendInfo>
voidexecuteInActor(@NonNull InternalCommand<T> command) Execute a command in the context of the client actor.<T extends BackendInfo>
CancellableexecuteInActor(@NonNull InternalCommand<T> command, Duration delay) @NonNull MessageSlicerfinal @NonNull ActorRefself()@NonNull Tickerticker()Return the time ticker for thisClientActorContext.
-
Method Details
-
getIdentifier
- Specified by:
getIdentifierin interfaceIdentifiable<ClientIdentifier>
-
config
-
dispatchers
-
messageSlicer
-
ticker
Return the time ticker for thisClientActorContext. This should be used for in all time-tracking done within a client actor. Subclasses ofClientActorBehaviorare encouraged to useStopwatch.- Returns:
- Client actor time source
-
executeInActor
Execute a command in the context of the client actor.- Type Parameters:
T- BackendInfo type- Parameters:
command- Block of code which needs to be execute
-
executeInActor
public <T extends BackendInfo> Cancellable executeInActor(@NonNull InternalCommand<T> command, Duration delay) -
self
-