|
|||||||||
| 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 |
setWorkerThreadCount(int workerThreadCount)
Sets the number of worker threads used by this processor. |
void |
setWorkUnitFactory(WorkUnitFactory workUnitFactory)
Sets a WorkUnitFactory instance for use by this processor. |
void |
setWorkUnitInputProducer(InputProducer inputProducer)
Set an InputProducer instance. |
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 setWorkUnitFactory(WorkUnitFactory workUnitFactory)
WorkUnitFactory instance for use by this processor.
workUnitFactory - creates WorkUnit instances that will be used to
concurrently process inputs returned by the
InputProducer instance.void setWorkUnitInputProducer(InputProducer inputProducer)
InputProducer instance.
inputProducer - returns inputs to be concurrently processed.
void start()
throws edu.emory.mathcs.backport.java.util.concurrent.ExecutionException
InputProducer instance using WorkUnit instances returned
by the WorkUnitFactory instance.
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException
void cleanup(long joinTimeout)
throws java.lang.InterruptedException,
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException,
edu.emory.mathcs.backport.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.
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException - if any of the worker threads encountered an error during
execution.
edu.emory.mathcs.backport.java.util.concurrent.TimeoutException
void cleanup()
throws java.lang.InterruptedException,
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException,
edu.emory.mathcs.backport.java.util.concurrent.TimeoutException
cleanup(long) with Long.MAX_VALUE.
java.lang.InterruptedException
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException
edu.emory.mathcs.backport.java.util.concurrent.TimeoutExceptionvoid setWorkerThreadCount(int workerThreadCount)
WorkUnits being processed using
WorkUnitManager.getConcurrencyDegree(edu.emory.mathcs.backport.java.util.concurrent.Callable).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||