ExecutorFactory class
A factory that can create a:
- TriggerExecutor using the createTriggerExecutor method
- TaskExecutor using the getTaskExecutor method
Note that each deployment needs its own set of trigger and task executors. This is because trigger executors needs to be reused across tasks in the same deployment (in the task control), while avoiding them to be reused across deployments (if the trigger or task has the same name). Therefore, the dispose methods should be called when starting the execution of a new deployment.
Constructors
- ExecutorFactory()
-
Get the singleton instance of ExecutorFactory.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createTriggerExecutor(
int triggerId, TriggerConfiguration trigger) → TriggerExecutor< TriggerConfiguration> ? -
Create a TriggerExecutor based on the
trigger
type. Returns null iftrigger
is not supported by any registered TriggerFactory factories. -
dispose(
) → void - Dispose of all trigger and task executors.
-
getTaskExecutor(
TaskConfiguration task) → TaskExecutor< TaskConfiguration> -
Get the TaskExecutor for a
task
based on the task name. If the task executor does not exist, a new one is created based on the type of the task. -
getTriggerExecutor(
int triggerId) → TriggerExecutor< TriggerConfiguration> ? -
Get the TriggerExecutor for a
triggerId
, if available. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerTriggerFactory(
TriggerFactory factory) → void -
Register
factory
which can create TriggerExecutors for the specified TriggerFactory runtime types. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited