Class OwnedScheduler

java.lang.Object
com.ultikits.ultitools.scheduling.internal.OwnedScheduler
All Implemented Interfaces:
Scheduler

@Internal final class OwnedScheduler extends Object implements Scheduler
One independently retired owner; its name is diagnostic, never its identity.
  • Field Details

  • Constructor Details

  • Method Details

    • owner

      public String owner()
      Description copied from interface: Scheduler
      Returns the owning module's name, or UltiTools for the framework, for diagnostics.
      Specified by:
      owner in interface Scheduler
    • global

      public Context global()
      Description copied from interface: Scheduler
      Returns the context for server-wide work, such as world time, weather or server state.
      Specified by:
      global in interface Scheduler
    • async

      public Context async()
      Description copied from interface: Scheduler
      Returns the wall-clock context for I/O, networking or computation, never tick-thread work. See TaskContext for delay, execution-thread and overlap guarantees.
      Specified by:
      async in interface Scheduler
    • region

      public Context region(org.bukkit.Location location)
      Description copied from interface: Scheduler
      Returns the context owning the blocks/chunk at the location.
      Specified by:
      region in interface Scheduler
    • region

      public Context region(org.bukkit.World world, int chunkX, int chunkZ)
      Description copied from interface: Scheduler
      Returns the context owning the given chunk of the world.
      Specified by:
      region in interface Scheduler
    • entity

      public Context entity(org.bukkit.entity.Entity entity)
      Description copied from interface: Scheduler
      Returns the context following an entity as it moves. Tasks of an entity that is removed from the server are not run and end RETIRED: a non-player entity that dies, despawns or is discarded, or a player who quits. A player who dies and respawns, and any entity changing dimension, keeps its tasks.

      On an entity that is already removed, run, runLater and runRepeating return a handle that is already RETIRED (its completion fails with TaskRetiredException), supply returns a future already failed with TaskRetiredException, and execute throws RejectedExecutionException.

      Specified by:
      entity in interface Scheduler
    • checkActive

      void checkActive()
    • submit

      TaskHandle submit(TaskRecord record, long delay)
    • retire

      void retire()