Package arez
Class Observer.Flags
java.lang.Object
arez.Observer.Flags
- Enclosing class:
- Observer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag set set if the application code can not invoke theObserver.reportStale()
method.static final int
Flag set if the application code can invoke theObserver.reportStale()
method to indicate that a non-arez dependency has changed.static final int
Flag set set if the application code can not invoketheObserver.reportStale()
method to indicate that a dependency has changed.static final int
The runtime will keep the observer reacting to dependencies until disposed.static final int
Indicates that the an action can be created from within the Observers observed function.static final int
Indicates that the an action must not be created from within the Observers observed function.static final int
The flag can be passed to actions or observers to force the action to not report result to spy infrastructure.static final int
Flag indicating that the Observer 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
The observer can only read arez state.static final int
The observer can read or write arez state.static final int
The scheduler will not be triggered when the observer is created.static final int
The scheduler will be triggered when the observer is created to immediately invoke theObserver._observe
function. -
Constructor Summary
-
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.ComputableValue
s) 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 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 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._observe
function. This configuration should not be specified if there is noObserver._observe
function supplied. This should not be specified ifRUN_LATER
is specified.- See Also:
-
RUN_LATER
The scheduler will not be triggered when the observer is created. The observer either has noObserver._observe
function or is responsible for ensuring thatArezContext.triggerScheduler()
is invoked at a later time. This should not be specified ifRUN_NOW
is specified.- See Also:
-
OBSERVE_LOWER_PRIORITY_DEPENDENCIES
Flag indicating that the Observer is allowed to observeComputableValue
instances 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()
-