|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConcurrentProcessor
Executes jobs in parallel and returns their results iterator-style.
| Method Summary | |
|---|---|
void |
cleanup()
Calls cleanup(long) with Long.MAX_VALUE. |
void |
cleanup(long joinTimeout)
Awaits termination of worker threads executing on behalf of this processor and releases any resource this processor has reserved. |
void |
setMaxOutputQueueSize(int size)
Sets the maximum size of the output queue. |
void |
setWorkerThreadCount(int workerThreadCount)
Sets the number of worker threads used by this processor. |
void |
start()
Starts concurrently processing inputs returned by the InputProducer instance using WorkUnit instances returned
by the WorkUnitFactory instance. |
| Methods inherited from interface chemaxon.util.concurrent.util.ConcurrentIterator |
|---|
getNext, hasNext |
| Methods inherited from interface chemaxon.util.Cancelable |
|---|
cancel, isCanceled |
| Method Detail |
|---|
void setMaxOutputQueueSize(int size)
start() is called. The default output queue size is: CPU core
count * 100.
size - the maximum size of the output queue.
void start()
throws java.util.concurrent.ExecutionException
InputProducer instance using WorkUnit instances returned
by the WorkUnitFactory instance.
java.util.concurrent.ExecutionException
void cleanup(long joinTimeout)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
joinTimeout - specifies in milliseconds at most how long this method is
allowed to await the termination of each the worker threads.
'0' means don't wait at all. This parameter is relevant when
the worker threads have been cancelled as a result of the
processor having been cancelled either explicitly by the user
or internally reacting on an execution error.
java.lang.InterruptedException - if the current thread has been interrupted.
java.util.concurrent.ExecutionException - if any of the worker threads encountered an error during
execution.
java.util.concurrent.TimeoutException
void cleanup()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
cleanup(long) with Long.MAX_VALUE.
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutExceptionvoid setWorkerThreadCount(int workerThreadCount)
WorkUnits being processed using
WorkUnitManager.getConcurrencyDegree(java.util.concurrent.Callable).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||