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
Constructors Modifier Constructor Description protectedRecyclableIterator(Runnable recycler)Creates aRecyclableIteratorwith the given optional recycler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreleaseBatch()Releases the batch that this iterator iterated over.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.connector.file.src.reader.BulkFormat.RecordIterator
next
-
-
-
-
Constructor Detail
-
RecyclableIterator
protected RecyclableIterator(@Nullable Runnable recycler)Creates aRecyclableIteratorwith the given optional recycler.
-
-
Method Detail
-
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>
-
-