Package me.hsgamer.hscore.task.element
Class TaskPool
java.lang.Object
me.hsgamer.hscore.task.element.TaskPool
The task pool of the 
BatchRunnable- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdd the task to the head of the task pooladdFirst(Consumer<TaskProcess> task) Add the task to the head of the task poolAdd the task to the tail of the task pooladdLast(Consumer<TaskProcess> task) Add the task to the tail of the task poolintgetStage()Get the stage of the task poolpollTask()Poll the task
- 
Constructor Details- 
TaskPoolpublic TaskPool(int stage) Create a new task pool- Parameters:
- stage- the stage of the task pool
 
 
- 
- 
Method Details- 
addFirstAdd the task to the head of the task pool- Parameters:
- task- the task
- Returns:
- the current task pool, for chaining
 
- 
addLastAdd the task to the tail of the task pool- Parameters:
- task- the task
- Returns:
- the current task pool, for chaining
 
- 
addFirstAdd the task to the head of the task pool- Parameters:
- task- the task
- Returns:
- the current task pool, for chaining
 
- 
addLastAdd the task to the tail of the task pool- Parameters:
- task- the task
- Returns:
- the current task pool, for chaining
 
- 
pollTaskPoll the task- Returns:
- the task or null if there is no task
 
- 
getStagepublic int getStage()Get the stage of the task pool- Returns:
- the stage
 
 
-