Class TaskManager.BoundTask

java.lang.Object
com.ultikits.ultitools.manager.TaskManager.BoundTask
Enclosing class:
TaskManager

static final class TaskManager.BoundTask extends Object
Per-method record of one config-bound Scheduled task: what to invoke, where its bound values come from, its current timing in ticks, when it was armed and last ran, and its current global-context trigger. Timing is mutated only on the main thread. Async workers access only immutable invocation fields and the concurrent outstanding-work set.
Since:
6.2.0
  • Field Details

    • bean

      final Object bean
    • method

      final Method method
    • scheduled

      final Scheduled scheduled
    • owner

      final String owner
    • periodSource

      final ConfigBindings.Source periodSource
    • delaySource

      final ConfigBindings.Source delaySource
    • asyncRuns

      final Set<TaskHandle> asyncRuns
      Outstanding async bodies, removed on completion and cancelled on module unload.
    • periodTicks

      long periodTicks
    • delayTicks

      long delayTicks
    • armTick

      int armTick
      Tick the task was first armed at load; the anchor for "arm tick + new delay".
    • hasRun

      boolean hasRun
      Whether the task has run at least once. Kept apart from lastFireTick because every int is a real tick -- Integer.MIN_VALUE included, right after the counter wraps -- so no tick value can double as "never ran" (Codex round 8 on #536).
    • lastFireTick

      int lastFireTick
      Observed start of the last run, stamped on the main thread; meaningful only when hasRun.
    • task

    • scheduler

      Scheduler scheduler
  • Constructor Details

  • Method Details