Package arez
Class Observer.Flags
java.lang.Object
arez.Observer.Flags
- Enclosing class:
- Observer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFlag set set if the application code can not invoke theObserver.reportStale()method.static final intFlag set if the application code can invoke theObserver.reportStale()method to indicate that a non-arez dependency has changed.static final intFlag set set if the application code can not invoketheObserver.reportStale()method to indicate that a dependency has changed.static final intThe runtime will keep the observer reacting to dependencies until disposed.static final intIndicates that the an action can be created from within the Observers observed function.static final intIndicates that the an action must not be created from within the Observers observed function.static final intThe flag can be passed to actions or observers to force the action to not report result to spy infrastructure.static final intFlag indicating that the Observer 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 intThe observer can only read arez state.static final intThe observer can read or write arez state.static final intThe scheduler will not be triggered when the observer is created.static final intThe scheduler will be triggered when the observer is created to immediately invoke theObserver._observefunction. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NO_REPORT_RESULT
The flag can be passed to actions or observers to force the action to not report result to spy infrastructure.- See Also:
-
PRIORITY_HIGHEST
Highest priority. This priority should be used when the observer will dispose or release other reactive elements (and thus remove elements from being scheduled).Only one of the PRIORITY_* flags should be applied to observer.
-
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 observer may trigger many downstream reactions.Only one of the PRIORITY_* flags should be applied to observer.
-
PRIORITY_NORMAL
Normal priority if no other priority otherwise specified.Only one of the PRIORITY_* flags should be applied to observer.
-
PRIORITY_LOW
Low priority. Usually used to schedule observers that reflect state onto non-reactive application components. i.e. Observers 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.ComputableValues) triggering this reaction multiple times within a single reaction round.Only one of the PRIORITY_* flags should be applied to observer.
-
PRIORITY_LOWEST
Lowest priority. Use this priority if the observer is aComputableValuethat may be unobserved when aPRIORITY_LOWobserver 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 observer.
-
PRIORITY_MASK
Mask used to extract priority bits.- See Also:
-
READ_ONLY
The observer can only read arez state.- See Also:
-
READ_WRITE
The observer can read or write arez state.- See Also:
-
RUN_NOW
The scheduler will be triggered when the observer is created to immediately invoke theObserver._observefunction. This configuration should not be specified if there is noObserver._observefunction supplied. This should not be specified ifRUN_LATERis specified.- See Also:
-
RUN_LATER
The scheduler will not be triggered when the observer is created. The observer either has noObserver._observefunction or is responsible for ensuring thatArezContext.triggerScheduler()is invoked at a later time. This should not be specified ifRUN_NOWis specified.- See Also:
-
OBSERVE_LOWER_PRIORITY_DEPENDENCIES
Flag indicating that the Observer is allowed to observeComputableValueinstances with a lower priority.- See Also:
-
NESTED_ACTIONS_ALLOWED
Indicates that the an action can be created from within the Observers observed function.- See Also:
-
NESTED_ACTIONS_DISALLOWED
Indicates that the an action must not be created from within the Observers observed function.- See Also:
-
AREZ_DEPENDENCIES
Flag set set if the application code can not invoke theObserver.reportStale()method.- See Also:
-
AREZ_OR_NO_DEPENDENCIES
Flag set set if the application code can not invoketheObserver.reportStale()method to indicate that a dependency has changed. In this scenario it is not an error if the observer does not invoke theObservableValue.reportObserved()on a dependency during it's reaction.- See Also:
-
AREZ_OR_EXTERNAL_DEPENDENCIES
Flag set if the application code can invoke theObserver.reportStale()method to indicate that a non-arez dependency has changed. -
KEEPALIVE
The runtime will keep the observer reacting to dependencies until disposed. This is the default value for observers that supply a observed function.- See Also:
-
-
Constructor Details
-
Flags
public Flags()
-