Class NonReusingBlockResettableIterator<T>

    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
      • nextElement

        protected T nextElement
      • leftOverElement

        protected T leftOverElement
      • readPhase

        protected boolean readPhase
      • noMoreBlocks

        protected boolean noMoreBlocks
      • serializer

        protected final org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer
      • numRecordsInBuffer

        protected int numRecordsInBuffer
      • numRecordsReturned

        protected int numRecordsReturned
      • emptySegments

        protected final ArrayList<org.apache.flink.core.memory.MemorySegment> emptySegments
      • fullSegments

        protected final ArrayList<org.apache.flink.core.memory.MemorySegment> fullSegments
      • closed

        protected volatile boolean closed
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>
      • nextBlock

        public boolean nextBlock()
                          throws IOException
        Description copied from interface: MemoryBlockIterator
        Move the iterator to the next memory block. The next memory block starts at the first element that was not in the block before. A special case is when no record was in the block before, which happens when this function is invoked two times directly in a sequence, without calling hasNext() or next in between. Then the block moves one element.
        Specified by:
        nextBlock in interface MemoryBlockIterator
        Returns:
        True if a new memory block was loaded, false if there were no further records and hence no further memory block.
        Throws:
        IOException - Thrown, when advancing to the next block failed.
      • hasFurtherInput

        public boolean hasFurtherInput()
        Checks, whether the input that is blocked by this iterator, has further elements available. This method may be used to forecast (for example at the point where a block is full) whether there will be more data (possibly in another block).
        Returns:
        True, if there will be more data, false otherwise.
      • close

        public void close()
        This method closes the iterator and releases all resources. This method works both as a regular shutdown and as a canceling method. The method may be called multiple times and will not produce an error.
      • open

        public void open()