Class IteratorDelegateWithWorkerThread<T,I extends Iterator<T>>
java.lang.Object
org.aksw.commons.collections.PrefetchIterator<T>
org.aksw.jenax.dataaccess.sparql.link.query.IteratorDelegateWithWorkerThread<T,I>
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<T>,org.apache.jena.atlas.iterator.IteratorCloseable<T>,org.apache.jena.atlas.lib.Closeable
public class IteratorDelegateWithWorkerThread<T,I extends Iterator<T>>
extends org.aksw.commons.collections.PrefetchIterator<T>
implements org.apache.jena.atlas.iterator.IteratorCloseable<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intNumber of items to transfer in batch from the worker thread to the calling threadprotected Iprotected WorkerThreadBase -
Constructor Summary
ConstructorsConstructorDescriptionIteratorDelegateWithWorkerThread(I delegate, ExecutorService es) IteratorDelegateWithWorkerThread(I delegate, ExecutorService es, int batchSize) -
Method Summary
Methods inherited from class org.aksw.commons.collections.PrefetchIterator
hasNext, next, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Field Details
-
helper
-
batchSize
protected int batchSizeNumber of items to transfer in batch from the worker thread to the calling thread -
delegate
-
-
Constructor Details
-
IteratorDelegateWithWorkerThread
-
IteratorDelegateWithWorkerThread
-
-
Method Details
-
getDelegate
-
copy
Certain objects such as TDB2 Bindings must be copied in order to detach them from resources that are free'd when the iterator is closed. -
prefetch
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable- Overrides:
closein classorg.aksw.commons.collections.PrefetchIterator<T>
-