Interface TinyTaskService
-
- All Implemented Interfaces:
public interface TinyTaskServiceTask based on ThreadPoolTaskScheduler and Database. `execute` is only for execution, not involve notice or databases `schedule` auto trigger notice and database, task is managed by id- Since:
2022-11-29
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classTinyTaskService.Task
-
Method Summary
Modifier and Type Method Description abstract ThreadPoolTaskSchedulerreferScheduler(boolean fast)Get the internal ThreadPoolTaskScheduler ScheduledExecutorServicereferExecutor(boolean fast)Get the internal ScheduledExecutorService voidexecute(boolean fast, @NotNull() Runnable task)Async execute a task immediately. ScheduledFuture<out Object>execute(boolean fast, long delayMs, @NotNull() Runnable task)Async execute a task after `delayMs` millis (ThreadNow). ScheduledFuture<out Object>execute(boolean fast, Instant startTime, @NotNull() Runnable task)Async execute a task at specified time (`fastTime` without timezone), `fast` means a lightweight that executes quickly and completes within seconds. ScheduledFuture<out Object>execute(boolean fast, Trigger trigger, @NotNull() Runnable task)Async execute a task by specified trigger, `fast` means a lightweight that executes quickly and completes within seconds. abstract Set<TinyTaskService.Task>schedule(@NotNull() Object taskerBean)Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them. abstract TinyTaskService.Taskschedule(@NotNull() Object taskerBean, @NotNull() Method taskerCall, @Nullable() Object taskerPara)Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them. TinyTaskService.Taskschedule(@NotNull() Lam.Ref lambdaRefer, @Nullable() Object taskerPara)Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them. -
-
Method Detail
-
referScheduler
@NotNull() abstract ThreadPoolTaskScheduler referScheduler(boolean fast)
Get the internal ThreadPoolTaskScheduler
-
referExecutor
@NotNull() ScheduledExecutorService referExecutor(boolean fast)
Get the internal ScheduledExecutorService
-
execute
void execute(boolean fast, @NotNull() Runnable task)
Async execute a task immediately. `fast` means a lightweight that executes quickly and completes within seconds.
-
execute
ScheduledFuture<out Object> execute(boolean fast, long delayMs, @NotNull() Runnable task)
Async execute a task after `delayMs` millis (ThreadNow). `fast` means a lightweight that executes quickly and completes within seconds.
-
execute
ScheduledFuture<out Object> execute(boolean fast, Instant startTime, @NotNull() Runnable task)
Async execute a task at specified time (`fastTime` without timezone), `fast` means a lightweight that executes quickly and completes within seconds.
-
execute
ScheduledFuture<out Object> execute(boolean fast, Trigger trigger, @NotNull() Runnable task)
Async execute a task by specified trigger, `fast` means a lightweight that executes quickly and completes within seconds. The `errorHandler` is different from other methods and does not recognize `DelegatingErrorHandlingRunnable`.
-
schedule
@NotNull() abstract Set<TinyTaskService.Task> schedule(@NotNull() Object taskerBean)
Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them.
-
schedule
abstract TinyTaskService.Task schedule(@NotNull() Object taskerBean, @NotNull() Method taskerCall, @Nullable() Object taskerPara)
Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them. taskId == `-1` means not start
-
schedule
TinyTaskService.Task schedule(@NotNull() Lam.Ref lambdaRefer, @Nullable() Object taskerPara)
Take all the methods annotated with TinyTask inside the taskerBean, initialize them as tasks, and execute them. taskId == `-1` means not start, `lambdaRefer` is lambda ref, get by `Lam.ref(taskerBean::method)`
-
-
-
-