Package com.ultikits.ultitools.manager
Class TaskManager.BoundTask
java.lang.Object
com.ultikits.ultitools.manager.TaskManager.BoundTask
- Enclosing class:
TaskManager
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 Bukkit task. Mutated only on the main thread: a bound task is never async.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intTick the task was first armed at load; the anchor for "arm tick + new delay".(package private) final Object(package private) final ConfigBindings.Source(package private) long(package private) booleanWhether the task has run at least once.(package private) intObserved start of the last run, stamped on the main thread; meaningful only whenhasRun.(package private) final Method(package private) final String(package private) final ConfigBindings.Source(package private) long(package private) final Scheduled(package private) org.bukkit.scheduler.BukkitTask -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBoundTask(Object bean, Method method, Scheduled scheduled, String owner, ConfigBindings.Source periodSource, ConfigBindings.Source delaySource, long periodTicks, long delayTicks) -
Method Summary
Modifier and TypeMethodDescription(package private) static TaskManager.BoundTaskresolveAtLoad(UltiToolsPlugin module, Object bean, Class<?> targetClass, Method method, Scheduled scheduled) Resolves and range-checks a bound method at load.private static longticksAtLoad(UltiToolsPlugin module, String owner, ConfigBindings.Source source)
-
Field Details
-
bean
-
method
-
scheduled
-
owner
-
periodSource
-
delaySource
-
periodTicks
long periodTicks -
delayTicks
long delayTicks -
armTick
int armTickTick the task was first armed at load; the anchor for "arm tick + new delay". -
hasRun
boolean hasRunWhether the task has run at least once. Kept apart fromlastFireTickbecause everyintis a real tick --Integer.MIN_VALUEincluded, right after the counter wraps -- so no tick value can double as "never ran" (Codex round 8 on #536). -
lastFireTick
int lastFireTickObserved start of the last run, stamped on the main thread; meaningful only whenhasRun. -
task
org.bukkit.scheduler.BukkitTask task
-
-
Constructor Details
-
BoundTask
private BoundTask(Object bean, Method method, Scheduled scheduled, String owner, ConfigBindings.Source periodSource, ConfigBindings.Source delaySource, long periodTicks, long delayTicks)
-
-
Method Details
-
resolveAtLoad
static TaskManager.BoundTask resolveAtLoad(UltiToolsPlugin module, Object bean, Class<?> targetClass, Method method, Scheduled scheduled) Resolves and range-checks a bound method at load. An unbound element keeps its literal. -
ticksAtLoad
-