|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.util.WorkerPool
A simple static workpool. Worker threads are created when necessary.
Constructor Summary | |
WorkerPool()
Creates a new worker pool with the default size of 10 workers and the default name. |
|
WorkerPool(int size)
Creates a new workerpool with the given number of workers and the default name. |
|
WorkerPool(int size,
java.lang.String namePrefix)
Creates a new worker pool for the given number of workers and with the given name prefix. |
Method Summary | |
void |
finishAll()
Finishes all worker of this pool. |
WorkerHandle |
getWorkerForWorkload(java.lang.Runnable r)
Returns a workerhandle for the given workload. |
boolean |
isWorkerAvailable()
Checks, whether workers are available. |
void |
workerAvailable(Worker worker)
Marks the given worker as available. |
void |
workerFinished(Worker worker)
Marks the given worker as finished. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkerPool()
public WorkerPool(int size)
size
- the maximum number of workers available.public WorkerPool(int size, java.lang.String namePrefix)
size
- the size of the worker pool.namePrefix
- the name prefix for all created workers.Method Detail |
public boolean isWorkerAvailable()
public WorkerHandle getWorkerForWorkload(java.lang.Runnable r)
r
- the workload for the worker
public void workerFinished(Worker worker)
worker
- the worker which was finished.public void workerAvailable(Worker worker)
worker
- the worker which was available.public void finishAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |