|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.util.concurrent.marvin.ReusableInputProducer
public class ReusableInputProducer
Input producer that provides reusable input.
The input objects are stored in a queue, returned one-by-one by getNext()
and should be returned by the caller by reuse(java.lang.Object) - then the
input object is again added to the queue and can be accessed by getNext().
This input producer can be used to distribute resources, calculation performer objects
(e.g. plugins).
| Constructor Summary | |
|---|---|
ReusableInputProducer(java.lang.Object[] inputs)
Constructor. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
createInput()
|
java.lang.Object |
getNext()
Returns the next input object. |
boolean |
hasNext()
Returns true. |
void |
reuse(java.lang.Object input)
Puts an input object into the input queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReusableInputProducer(java.lang.Object[] inputs)
inputs - the input objects| Method Detail |
|---|
public void reuse(java.lang.Object input)
input - the input object
public boolean hasNext()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
true.
hasNext in interface chemaxon.util.concurrent.util.ConcurrentIteratortrue
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public java.lang.Object getNext()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
getNext in interface chemaxon.util.concurrent.util.ConcurrentIteratorjava.lang.InterruptedException
java.util.concurrent.ExecutionExceptionprotected java.lang.Object createInput()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||