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
FieldsModifier and TypeFieldDescriptionstatic final intIndicates that application code cannot invokeComputableValue.reportPossiblyChanged()and theComputableValueis only recalculated if a dependency is updated.static final intIndicates that application code can invokeComputableValue.reportPossiblyChanged()to indicate some dependency has changed and that theComputableValueshould recompute.static final intFlag set if the application code cannot invokeComputableValue.reportPossiblyChanged()to indicate that a dependency has changed.static final intThe runtime will keep the ComputableValue reacting to dependencies until disposed.static final intIf passed, then the computable value should not report result to the spy infrastructure.static final intFlag indicating that the ComputableValue is allowed to observeComputableValueinstances with a lower priority.static final intHigh priority.static final intHighest priority.static final intLow priority.static final intLowest priority.static final intMask used to extract priority bits.static final intNormal priority if no other priority otherwise specified.static final intFlag indicating that the ComputableValue be accessed outside a transaction.static final intThe scheduler will not be triggered when the ComputableValue is created.static final intThe scheduler will be triggered when the ComputableValue is created to immediately invoke the compute function. -
Constructor Summary
Constructors -
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_LATERis 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_NOWis 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 cannot invokeComputableValue.reportPossiblyChanged()and theComputableValueis only recalculated if a dependency is updated. -
AREZ_OR_NO_DEPENDENCIES
Flag set if the application code cannot 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 theComputableValueshould recompute. -
OBSERVE_LOWER_PRIORITY_DEPENDENCIES
Flag indicating that the ComputableValue is allowed to observeComputableValueinstances 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.ComputableValues) 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_LOWelement reacts. This is used to avoid recomputing state, that is likely to either be unobserved or recomputed as part of another element's 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
Flag indicating that the ComputableValue be accessed outside a transaction.- See Also:
-
-
Constructor Details
-
Flags
public Flags()
-