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 voidaddCurrentTaskPool(Consumer<TaskPool> taskPoolConsumer) Execute the consumer for the current task pooldefault voidaddTaskPool(int stage, Consumer<TaskPool> taskPoolConsumer) Execute the consumer for the task poolvoidcomplete()Notify theBatchRunnableto stopGet the current task poolgetData()Get the data of the runningBatchRunnablegetTaskPool(int stage) Get the task poolvoidnext()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 theBatchRunnableto 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
-