Package arez
Class Task.Flags
java.lang.Object
arez.Task.Flags
- Enclosing class:
- Task
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The flag that specifies that the task should be disposed after it has completed execution.static final int
The flag that indicates that task should not be wrapped.static final int
High priority.static final int
Highest priority.static final int
Low priority.static final int
Lowest priority.static final int
Normal priority if no other priority otherwise specified.static final int
The scheduler will not be triggered when the task is created.static final int
The scheduler will be triggered when the task is created to immediately invoke the task. -
Method Summary
-
Field Details
-
PRIORITY_HIGHEST
Highest priority. This priority should be used when the task will dispose or release other reactive elements (and thus remove elements from being scheduled).Only one of the PRIORITY_* flags should be applied to a task.
-
PRIORITY_HIGH
High priority. To reduce the chance that downstream elements will react multiple times within a single reaction round, this priority should be used when the task may trigger many downstream tasks.Only one of the PRIORITY_* flags should be applied to a task.
- See Also:
-
PRIORITY_NORMAL
Normal priority if no other priority otherwise specified.Only one of the PRIORITY_* flags should be applied to a task.
-
PRIORITY_LOW
Low priority. Usually used to schedule tasks that reflect state onto non-reactive application components. i.e. Tasks that are used to build html views, perform network operations etc. These reactions are often at low priority to avoid recalculation of dependencies (i.e.ComputableValue
s) triggering this reaction multiple times within a single reaction round.Only one of the PRIORITY_* flags should be applied to a task.
- See Also:
-
PRIORITY_LOWEST
Lowest priority. Use this priority if the task is aComputableValue
that may be unobserved when aPRIORITY_LOW
observer reacts. This is used to avoid recomputing state that is likely to either be unobserved or recomputed as part of another observers reaction.Only one of the PRIORITY_* flags should be applied to a task.
-
RUN_NOW
The scheduler will be triggered when the task is created to immediately invoke the task. This should not be specified ifRUN_LATER
is specified.- See Also:
-
RUN_LATER
The scheduler will not be triggered when the task is created. The application is responsible for ensuring thattheArezContext.triggerScheduler()
method is invoked at a later time. This should not be specified ifRUN_NOW
is specified.- See Also:
-
NO_WRAP_TASK
The flag that indicates that task should not be wrapped. The wrapping is responsible for ensuring the task never generates an exception and for generating the spy events. If wrapping is disabled it is expected that the caller is responsible for integrating with the spy subsystem and catching exceptions if any.- See Also:
-
DISPOSE_ON_COMPLETE
The flag that specifies that the task should be disposed after it has completed execution.- See Also:
-