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 Details

    • RecyclableIterator

      protected RecyclableIterator(@Nullable Runnable recycler)
      Creates a RecyclableIterator with the given optional recycler.
  • Method Details

    • releaseBatch

      public void releaseBatch()
      Description copied from interface: BulkFormat.RecordIterator
      Releases 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:
      releaseBatch in interface BulkFormat.RecordIterator<E>