Class ReusingMutableToRegularIteratorWrapper<T>

java.lang.Object
org.apache.flink.runtime.util.ReusingMutableToRegularIteratorWrapper<T>
All Implemented Interfaces:
Iterable<T>, Iterator<T>

public class ReusingMutableToRegularIteratorWrapper<T> extends Object implements Iterator<T>, Iterable<T>
This class wraps a MutableObjectIterator into a regular Iterator. Internally, it uses two record instances which it uses alternating. That way, whenever hasNext() returns (possibly with false), the previous obtained record is still valid and cannot have been overwritten internally.
  • Constructor Details

    • ReusingMutableToRegularIteratorWrapper

      public ReusingMutableToRegularIteratorWrapper(org.apache.flink.util.MutableObjectIterator<T> source, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
  • Method Details