Class RecyclableIterator<E>
java.lang.Object
org.apache.flink.connector.file.src.util.RecyclableIterator<E>
- Type Parameters:
E- The type of the records returned by the iterator.
- All Implemented Interfaces:
BulkFormat.RecordIterator<E>
- Direct Known Subclasses:
ArrayResultIterator,ColumnarRowIterator,IteratorResultIterator,SingletonResultIterator
@Internal
public abstract class RecyclableIterator<E>
extends Object
implements BulkFormat.RecordIterator<E>
Utility base class for iterators that accept a recycler.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRecyclableIterator(Runnable recycler) Creates aRecyclableIteratorwith the given optional recycler. -
Method Summary
Modifier and TypeMethodDescriptionvoidReleases the batch that this iterator iterated over.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.connector.file.src.reader.BulkFormat.RecordIterator
next
-
Constructor Details
-
RecyclableIterator
Creates aRecyclableIteratorwith the given optional recycler.
-
-
Method Details
-
releaseBatch
public void releaseBatch()Description copied from interface:BulkFormat.RecordIteratorReleases the batch that this iterator iterated over. This is not supposed to close the reader and its resources, but is simply a signal that this iterator is no used any more. This method can be used as a hook to recycle/reuse heavyweight object structures.- Specified by:
releaseBatchin interfaceBulkFormat.RecordIterator<E>
-