public interface TaskPriorityManager
| Modifier and Type | Method and Description |
|---|---|
void |
add(Task<?,?> task)
Add a task to execute.
|
void |
forceStop()
always called inside a synchronized block on this instance.
|
int |
getRemainingTasks(boolean includingBackground)
Return the number of waiting tasks.
|
boolean |
hasRemainingTasks(boolean includingBackground)
Return true if at least one task is waiting to execute.
|
Task<?,?> |
peekNext()
Return a task if one is immediately available, or null.
|
Task<?,?> |
peekNextOrWait()
Return a task if one is immediately available, or pause the calling thread.
|
boolean |
remove(Task<?,?> task)
Remove a task.
|
List<Task<?,?>> |
removeAllPendingTasks()
always called inside a synchronized block on this instance.
|
void |
setTaskManager(TaskManager taskManager)
Set the associated TaskManager that will execute tasks.
|
void setTaskManager(TaskManager taskManager)
void add(Task<?,?> task)
boolean remove(Task<?,?> task)
Task<?,?> peekNextOrWait()
Task<?,?> peekNext()
int getRemainingTasks(boolean includingBackground)
boolean hasRemainingTasks(boolean includingBackground)
List<Task<?,?>> removeAllPendingTasks()
void forceStop()
Copyright © 2019. All rights reserved.