com.waveset.util
Class BufferedSupplier
java.lang.Object
com.waveset.util.BufferedSupplier
- All Implemented Interfaces:
- java.lang.Runnable
- public class BufferedSupplier
- extends java.lang.Object
- implements java.lang.Runnable
BufferedSupplier will push objects that are retrieved from 'supplier'
into the queue 'queue'. It assumes that a call on 'supplier' returns
an Object[], from which it extracts the individual objects, and inserts
them into 'queue' in order.
If an Exception occurs while getting objects from the supplier, that
Exception object is put onto the queue.
BufferedSupplier.run() will terminate when one of the following is true:
- setClosed() is called with true as the argument
- The supplier returns isComplete()==true
- The supplier throws an Exception in call()
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferedSupplier
public BufferedSupplier(EDU.oswego.cs.dl.util.concurrent.BoundedBuffer queue,
Supplier supplier)
setClosed
public void setClosed(boolean closed)
isClosed
public boolean isClosed()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable