Package picard.util
Class AsyncIterator<T>
java.lang.Object
picard.util.AsyncIterator<T>
- All Implemented Interfaces:
htsjdk.samtools.util.CloseableIterator<T>,Closeable,AutoCloseable,Iterator<T>
Wrapper around a CloseableIterator that reads in a separate thread, for cases in which that might be
efficient.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAsyncIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, int queueSize, String threadNamePrefix) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toListMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
DEFAULT_QUEUE_SIZE
public static final int DEFAULT_QUEUE_SIZE- See Also:
-
-
Constructor Details
-
AsyncIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
close
public void close()Stops the thread and then calls synchronouslyClose() to allow implementation to do any one time clean up.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacehtsjdk.samtools.util.CloseableIterator<T>
-