|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.egothor.distributor.STE<T> org.egothor.distributor.MTE<T>
public class MTE<T>
An MTE is a multithread distributor that uses a Pool
for the management of threads.
Field Summary |
---|
Fields inherited from class org.egothor.distributor.STE |
---|
stopped |
Constructor Summary | |
---|---|
MTE()
Constructor for the MTE object. |
|
MTE(int threads)
Construct an MTE object with the specified number of threads. |
Method Summary | |
---|---|
void |
forEach(Sequence<T> to,
Task<T> task)
Put the task to all acting (inner) structures. |
int |
getThreads()
Return the number of threads in this MTE. |
void |
setThreads(int threads)
Set the number of threads for this MTE object |
void |
stop()
Kill all threads in the pool and mark the pool for garbage collection. |
Methods inherited from class org.egothor.distributor.STE |
---|
allow, iterate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MTE()
public MTE(int threads)
threads
- the number of threadsMethod Detail |
---|
public void setThreads(int threads)
threads
- the new number of threadspublic int getThreads()
public void stop()
stop
in interface Distributor<T>
stop
in class STE<T>
public void forEach(Sequence<T> to, Task<T> task)
forEach
in interface Distributor<T>
forEach
in class STE<T>
to
- an Enumeration of structurestask
- the task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |