|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.egothor.util.thread.Pool
public class Pool
Pool creates a Stack and fills it with threads. The threads in a Pool are activated when data comes for processing.
| Nested Class Summary | |
|---|---|
static interface |
Pool.Queue
This class is part of the Egothor Project |
| Field Summary | |
|---|---|
protected Pool.Queue |
queue
Description of the Field |
| Constructor Summary | |
|---|---|
protected |
Pool(int threads)
|
| Method Summary | |
|---|---|
void |
handle(java.lang.Object data)
Description of the Method |
protected void |
initialize(Pool.Queue queue)
|
boolean |
process(java.lang.Object data)
Description of the Method |
int |
size()
Return the maximum number of threads in the pool. |
void |
stop()
Kill all waiting threads. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Pool.Queue queue
| Constructor Detail |
|---|
protected Pool(int threads)
threads - maximum number of worker threads| Method Detail |
|---|
public int size()
public boolean process(java.lang.Object data)
data - Description of the Parameter
public void stop()
public void handle(java.lang.Object data)
data - Description of the Parameterprotected void initialize(Pool.Queue queue)
queue - queue used in this pool
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||