Skip to content

AggregateExecutor

An executor that runs a set of child executors.

Resuming, pausing or disposing it does the same to all children, and its measurements merges the measurements of all children. See SmartphoneDeploymentExecutor and TaskExecutor for examples.

Inheritance
Implementers

Constructors

AggregateExecutor

AggregateExecutor<TConfig>()

Properties

deviceInfo

DeviceInfoService deviceInfo
final

executors

Set<Executor> get executors

The set of underlying executors that this aggregate executor is managing.

measurements

Stream<Measurement> get measurements
override

The stream of Measurement collected by this executor.

Methods

addExecutor

void addExecutor(
  1. Executor executor
)

Adds executor to executors and forwards its measurements.

onDispose

Future<void> onDispose()
override

Callback when this executor is disposed.

Subclasses should override this, to implement any cleanup to be done before disposing.

onPause

Future<bool> onPause()
override

Called by pause. Returns true if successfully paused.

If false, the state is not changed.

onResume

Future<bool> onResume()
override

Called by resume. Returns true if successfully resumed.

If false, the executor moves to ExecutorState.PausedButShouldBeResumed.

removeExecutor

void removeExecutor(
  1. Executor executor
)

Removes executor from executors and stops forwarding its measurements.