Package foundry.veil.impl
Class TickTaskSchedulerImpl
java.lang.Object
foundry.veil.impl.TickTaskSchedulerImpl
- All Implemented Interfaces:
 TickTaskScheduler,Executor
- 
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.TickTaskScheduler
TickTaskScheduler.TickTask<V> - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes the specified command on the next particle system tick.booleanvoidrun()Runs a single tick and executes all pending tasks for that time.Schedules the specified command to run in the specified number of ticks.<V> TickTaskScheduler.TickTask<V> Schedules the specified command to run in the specified number of ticks.scheduleAtFixedRate(@NotNull Runnable command, long initialDelay, long period) Schedules the specified command to run after the specified initial delay in ticks and at each fixed time interval in ticks.voidshutdown()Stops the scheduler and runs all pending tasks as quickly as possible. 
- 
Constructor Details
- 
TickTaskSchedulerImpl
public TickTaskSchedulerImpl() 
 - 
 - 
Method Details
- 
run
public void run()Runs a single tick and executes all pending tasks for that time. - 
shutdown
public void shutdown()Stops the scheduler and runs all pending tasks as quickly as possible. - 
execute
Description copied from interface:TickTaskSchedulerExecutes the specified command on the next particle system tick.- Specified by:
 executein interfaceExecutor- Specified by:
 executein interfaceTickTaskScheduler- Parameters:
 command- The runnable task
 - 
schedule
Description copied from interface:TickTaskSchedulerSchedules the specified command to run in the specified number of ticks.- Specified by:
 schedulein interfaceTickTaskScheduler- Parameters:
 command- The runnable taskdelay- The delay in ticks- Returns:
 - A future that completes after the task has been run
 
 - 
schedule
public <V> TickTaskScheduler.TickTask<V> schedule(@NotNull @NotNull Callable<V> callable, long delay) Description copied from interface:TickTaskSchedulerSchedules the specified command to run in the specified number of ticks.- Specified by:
 schedulein interfaceTickTaskScheduler- Parameters:
 callable- The callable taskdelay- The delay in ticks- Returns:
 - A future that completes after the task has been run
 
 - 
scheduleAtFixedRate
public TickTaskScheduler.TickTask<?> scheduleAtFixedRate(@NotNull @NotNull Runnable command, long initialDelay, long period) Description copied from interface:TickTaskSchedulerSchedules the specified command to run after the specified initial delay in ticks and at each fixed time interval in ticks.- Specified by:
 scheduleAtFixedRatein interfaceTickTaskScheduler- Parameters:
 command- The runnable taskinitialDelay- The initial delay in ticksperiod- The period between task executions- Returns:
 - A future that completes if there was an error
 
 - 
isShutdown
public boolean isShutdown()- Specified by:
 isShutdownin interfaceTickTaskScheduler- Returns:
 - Whether the executor has shut down and will reject
 
 
 -