public interface Distributor<T>
Task
to a Sequence
of
objects, which are taken as recipients.
A second important functionality is the distribution of a Request
until it is fulfilled (Request.isDone()
).
Note: the Enumeration may be replaced by java.util.Set
Modifier and Type | Method and Description |
---|---|
void |
allow()
If this Distributor is stopped, restart it.
|
void |
forEach(Sequence<T> to,
Task<T> task)
Put the task to all acting (inner) structures.
|
void |
iterate(Sequence<T> to,
Request<T> task)
Iterate through the Enumeration (in Egothor's case the active
(inner) barrels) in a predefined and constant order and try
to give them the request until one of them fulfills it.
|
void |
stop()
Do not accept new activities.
|
void forEach(Sequence<T> to, Task<T> task)
to
- the recipients that will perform the worktask
- the taskvoid iterate(Sequence<T> to, Request<T> task)
to
- the recipients that will perform the worktask
- the taskvoid stop()
void allow()
Copyright © 2016 Egothor. All Rights Reserved.