AbstractExecutor<TConfig> class
abstract
The base class for all executors in CAMS.
Implements the Executor state machine. Subclasses only implement the callbacks onInitialize, onResume, onPause and onDispose; the lifecycle methods themselves cannot be overridden. A synchronous exception in a lifecycle method moves the executor to ExecutorState.Undefined.
- Implemented types
-
- Executor<
TConfig>
- Executor<
- Implementers
Constructors
Properties
- configuration → TConfig?
-
The configuration of this executor as set in initialize.
no setteroverride
- deployment → SmartphoneDeployment?
-
The deployment that this executor is part of executing.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
measurements
→ Stream<
Measurement> -
The stream of
Measurementcollected by this executor.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingState → SamplingState
-
The runtime sampling state of this executor.
no setteroverride
- state → ExecutorState
-
The runtime state of this executor.
no setteroverride
-
stateEvents
→ Stream<
ExecutorState> -
The runtime state changes of this executor.
no setteroverride
Methods
-
addError(
Object error, [StackTrace? stacktrace]) → void -
Logs
erroras a warning and adds it to the measurements stream. -
addMeasurement(
Measurement measurement) → void -
Adds
measurementto the measurements stream. -
dispose(
) → void -
Disposes this executor.
override
-
error(
) → void - Moves this executor to ExecutorState.Undefined.
-
initialize(
TConfig configuration, [SmartphoneDeployment? deployment]) → void -
Configures and initializes the executor. Call before resume.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
) → Future< void> - Callback when this executor is disposed.
-
onInitialize(
) → bool - Called by initialize. Returns true if successfully initialized.
-
onPause(
) → Future< bool> - Called by pause. Returns true if successfully paused.
-
onResume(
) → Future< bool> - Called by resume. Returns true if successfully resumed.
-
pause(
) → void -
Pauses the executor until resume is called.
override
-
pauseButShouldBeResumed(
) → void -
Pauses the executor and marks it to be resumed later.
override
-
resume(
) → void -
Starts or resumes the executor.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited