com.waveset.util
Class DoubleBufferQueue
java.lang.Object
com.waveset.util.BlockingQueueIterator
com.waveset.util.DoubleBufferQueue
- public class DoubleBufferQueue
- extends BlockingQueueIterator
The DoubleBufferQueue class encapsulates the logic required to allow
double buffering of objects coming from a 'supplier'
Since the queue is the same length as the expected buffer size, the queue
acts as one buffer, with the second buffer existing inside the BufferedSupplier.
Field Summary |
static java.lang.String |
code_id
|
Method Summary |
void |
close()
Force an interrupt on the supplier thread, in order to close down
the input source. |
protected void |
finalize()
|
protected Supplier |
getSupplier()
|
protected java.lang.Thread |
getThread()
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
DoubleBufferQueue
public DoubleBufferQueue(Supplier supplier)
close
public void close()
- Force an interrupt on the supplier thread, in order to close down
the input source.
- Overrides:
close
in class BlockingQueueIterator
getSupplier
protected Supplier getSupplier()
getThread
protected java.lang.Thread getThread()
finalize
protected void finalize()
throws java.lang.Throwable
- Throws:
java.lang.Throwable