public interface TaskFactory
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Executor |
async()
Async executor
|
default void |
asyncExecution(java.lang.Runnable runnable)
Directly execute an async operation
|
SchedularTask |
delayAsync(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit unit)
Execute async delayed task
|
SchedularTask |
repeatAsync(java.lang.Runnable runnable,
long interval,
java.util.concurrent.TimeUnit unit)
Execute async repeating task
|
void |
shutdownExecutor()
Shutdown executor handler
|
void |
shutdownTasks()
Shutdown all active tasks
|
java.util.concurrent.Executor |
sync()
sync executor
|
default void |
syncExecution(java.lang.Runnable runnable)
Directly execute a sync operation
|
java.util.concurrent.Executor async()
java.util.concurrent.Executor sync()
default void asyncExecution(java.lang.Runnable runnable)
runnable - commanddefault void syncExecution(java.lang.Runnable runnable)
runnable - commandSchedularTask repeatAsync(java.lang.Runnable runnable, long interval, java.util.concurrent.TimeUnit unit)
runnable - commandinterval - repeat intervalunit - time unit for intervalSchedularTask delayAsync(java.lang.Runnable runnable, long delay, java.util.concurrent.TimeUnit unit)
runnable - commanddelay - delay before executionunit - time unit for intervalvoid shutdownTasks()
void shutdownExecutor()