|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Distributor<T>
The Distributor interface should be implemented by any class that
distributes a 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
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
void forEach(Sequence<T> to,
Task<T> task)
to - the recipients that will perform the worktask - the task
void iterate(Sequence<T> to,
Request<T> task)
to - the recipients that will perform the worktask - the taskvoid stop()
void allow()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||