Package arez
Class ComputableValue.Flags
java.lang.Object
arez.ComputableValue.Flags
- Enclosing class:
- ComputableValue<T>
Flags that can configure ComputableValue instances during creation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that application code can not invokeComputableValue.reportPossiblyChanged()
and theComputableValue
is only recalculated if a dependency is updated.static final int
Indicates that application code can invokeComputableValue.reportPossiblyChanged()
to indicate some dependency has changed and that theComputableValue
should recompute.static final int
Flag set set if the application code can not invokeComputableValue.reportPossiblyChanged()
to indicate that a dependency has changed.static final int
The runtime will keep the ComputableValue reacting to dependencies until disposed.static final int
If passed, then the computable value should not report result to the spy infrastructure.static final int
Flag indicating that the ComputableValue is allowed to observeComputableValue
instances with a lower priority.static final int
High priority.static final int
Highest priority.static final int
Low priority.static final int
Lowest priority.static final int
Mask used to extract priority bits.static final int
Normal priority if no other priority otherwise specified.static final int
Can the ComputableValue be accessed outside a transaction.static final int
The scheduler will not be triggered when the ComputableValue is created.static final int
The scheduler will be triggered when the ComputableValue is created to immediately invoke the compute function. -
Constructor Summary
-
Method Summary
-
Field Details
-
RUN_NOW
The scheduler will be triggered when the ComputableValue is created to immediately invoke the compute function. This should not be specified ifRUN_LATER
is specified.- See Also:
-
RUN_LATER
The scheduler will not be triggered when the ComputableValue is created. The ComputableValue is responsible for ensuring thatArezContext.triggerScheduler()
is invoked at a later time. This should not be specified ifRUN_NOW
is specified.- See Also:
-
NO_REPORT_RESULT
If passed, then the computable value should not report result to the spy infrastructure. -
AREZ_DEPENDENCIES
Indicates that application code can not invokeComputableValue.reportPossiblyChanged()
and theComputableValue
is only recalculated if a dependency is updated. -
AREZ_OR_NO_DEPENDENCIES
Flag set set if the application code can not invokeComputableValue.reportPossiblyChanged()
to indicate that a dependency has changed. -
AREZ_OR_EXTERNAL_DEPENDENCIES
Indicates that application code can invokeComputableValue.reportPossiblyChanged()
to indicate some dependency has changed and that theComputableValue
should recompute. -
OBSERVE_LOWER_PRIORITY_DEPENDENCIES
Flag indicating that the ComputableValue is allowed to observeComputableValue
instances with a lower priority. -
KEEPALIVE
The runtime will keep the ComputableValue reacting to dependencies until disposed. -
PRIORITY_HIGHEST
Highest priority. This priority should be used when the ComputableValue will dispose or release other reactive elements (and thus remove elements from being scheduled).Only one of the PRIORITY_* flags should be applied to ComputableValue.
-
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 ComputableValue may trigger many downstream tasks.Only one of the PRIORITY_* flags should be applied to ComputableValue.
-
PRIORITY_NORMAL
Normal priority if no other priority otherwise specified.Only one of the PRIORITY_* flags should be applied to ComputableValue.
-
PRIORITY_LOW
Low priority. Usually used to schedule ComputableValues that support reflecting state onto non-reactive application components. i.e. ComputableValue that are used to build html views, perform network operations etc. These ComputableValues are often at low priority to avoid recalculation of dependencies (i.e.ComputableValue
s) triggering this ComputableValue multiple times within a single reaction round.Only one of the PRIORITY_* flags should be applied to ComputableValue.
-
PRIORITY_LOWEST
Lowest priority. Use this priority if the ComputableValue may be unobserved when aPRIORITY_LOW
element reacts. This is used to avoid recomputing state that is likely to either be unobserved or recomputed as part of another elements reaction.Only one of the PRIORITY_* flags should be applied to ComputableValue.
-
PRIORITY_MASK
Mask used to extract priority bits.- See Also:
-
READ_OUTSIDE_TRANSACTION
Can the ComputableValue be accessed outside a transaction.- See Also:
-
-
Constructor Details
-
Flags
public Flags()
-