Package arez

Class Task.Flags

java.lang.Object
arez.Task.Flags
Enclosing class:
Task

public static final class Task.Flags extends Object
  • Field Details

    • PRIORITY_HIGHEST

      public static final int 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.

      See Also:
    • PRIORITY_HIGH

      public static final int 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

      public static final int PRIORITY_NORMAL
      Normal priority if no other priority otherwise specified.

      Only one of the PRIORITY_* flags should be applied to a task.

      See Also:
    • PRIORITY_LOW

      public static final int 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. ComputableValues) 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

      public static final int PRIORITY_LOWEST
      Lowest priority. Use this priority if the task is a ComputableValue that may be unobserved when a PRIORITY_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.

      See Also:
    • RUN_NOW

      public static final int RUN_NOW
      The scheduler will be triggered when the task is created to immediately invoke the task. This should not be specified if RUN_LATER is specified.
      See Also:
    • RUN_LATER

      public static final int RUN_LATER
      The scheduler will not be triggered when the task is created. The application is responsible for ensuring thatthe ArezContext.triggerScheduler() method is invoked at a later time. This should not be specified if RUN_NOW is specified.
      See Also:
    • NO_WRAP_TASK

      public static final int 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

      public static final int DISPOSE_ON_COMPLETE
      The flag that specifies that the task should be disposed after it has completed execution.
      See Also: