public class AsyncIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.BlockingQueue<T> |
buffer |
protected java.util.Iterator<T> |
iterator |
protected T |
nextElement |
protected java.util.concurrent.atomic.AtomicBoolean |
shouldWork |
protected T |
terminator |
protected org.deeplearning4j.parallelism.AsyncIterator.ReaderThread<T> |
thread |
Constructor and Description |
---|
AsyncIterator(java.util.Iterator<T> iterator) |
AsyncIterator(java.util.Iterator<T> iterator,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
void |
shutdown() |
protected java.util.concurrent.BlockingQueue<T> buffer
protected org.deeplearning4j.parallelism.AsyncIterator.ReaderThread<T> thread
protected java.util.Iterator<T> iterator
protected T terminator
protected T nextElement
protected java.util.concurrent.atomic.AtomicBoolean shouldWork