Package org.jbrew.concurrent
Interface TaskRegistry
- All Known Implementing Classes:
TaskRegister
public interface TaskRegistry
A
TaskRegistry
is an interface specifying the requirements for a "register" or collection of
Tasks.- Author:
- nealk
- See Also:
TaskRegister
-
Method Summary
Modifier and Type Method Description int
getRegistrySize()
void
interruptAll()
void
offerTask(Task<?> task)
Inserts the specified element into thisTaskRegistry
.Task<?>
pollTask()
void
removeTask(Task<?> task)
Removes a single instance of the specifiedTask
from thisTaskRegistry
, if it is present.
-
Method Details
-
offerTask
Inserts the specified element into thisTaskRegistry
. Note that theTaskRegistry
is unbounded.- Parameters:
task
- - TheTask
to be inserted.
-
removeTask
Removes a single instance of the specifiedTask
from thisTaskRegistry
, if it is present. More formally, removes aTask task
such thattask
is no longer present in theTaskRegistry
if thisTaskRegistry
contains one or more such elements.- Parameters:
task
- - TheTask
to be removed.
-
getRegistrySize
int getRegistrySize() -
pollTask
Task<?> pollTask() -
interruptAll
void interruptAll()
-