public interface TaskRegistry
TaskRegistry
is an interface specifying the requirements for a "register" or collection of
Tasks.TaskRegister
Modifier and Type | Method and Description |
---|---|
int |
getRegistrySize() |
void |
interruptAll() |
void |
offer(Task<?>... tasks)
Inserts the specified element into this
TaskRegistry . |
void |
offer(Task<?> task)
Inserts the specified element into this
TaskRegistry . |
Task<?> |
pollTask() |
boolean |
remove(Task<?> task)
Removes a single instance of the specified
Task from this TaskRegistry ,
if it is present. |
void offer(Task<?> task)
TaskRegistry
. On average, the performance runtime of this
method is O(1).task
- - The Task
to be inserted.TaskRegister.offer(Task)
void offer(Task<?>... tasks)
TaskRegistry
. This is the varargs
implementation
of offer(Task)
, meaning that it handles all instances where there are either 0 or >1 parameter
arguments present.tasks
- - The set of zero or more Task
to be inserted into this registry.boolean remove(Task<?> task)
Task
from this TaskRegistry
,
if it is present. More formally, removes a Task task
such that task
is no longer
present in the TaskRegistry
if this TaskRegistry
contains one or more such elements.task
- - The Task
to be removed.int getRegistrySize()
Task<?> pollTask()
void interruptAll()
Copyright © 2020. All rights reserved.