Package me.hsgamer.hscore.task.element
Interface TaskProcess
public interface TaskProcess
The task process.
Used by the task to work with the running
BatchRunnable
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
addCurrentTaskPool
(Consumer<TaskPool> taskPoolConsumer) Execute the consumer for the current task pooldefault void
addTaskPool
(int stage, Consumer<TaskPool> taskPoolConsumer) Execute the consumer for the task poolvoid
complete()
Notify theBatchRunnable
to stopGet the current task poolgetData()
Get the data of the runningBatchRunnable
getTaskPool
(int stage) Get the task poolvoid
next()
Notify the next task
-
Method Details
-
getData
TaskData getData()Get the data of the runningBatchRunnable
- Returns:
- the data
-
next
void next()Notify the next task -
complete
void complete()Notify theBatchRunnable
to stop -
getCurrentTaskPool
TaskPool getCurrentTaskPool()Get the current task pool- Returns:
- the current task pool
-
getTaskPool
Get the task pool- Parameters:
stage
- the stage of the task pool- Returns:
- the task pool
-
addTaskPool
Execute the consumer for the task pool- Parameters:
stage
- the stage of the task pooltaskPoolConsumer
- the consumer
-
addCurrentTaskPool
Execute the consumer for the current task pool- Parameters:
taskPoolConsumer
- the consumer
-