Interface PrefetchableIterator<T>

All Superinterfaces:
Iterator<T>
All Known Implementing Classes:
DataStreams.DataStreamDecoder

public interface PrefetchableIterator<T> extends Iterator<T>
Iterator that supports prefetching the next set of records.
  • Method Details

    • isReady

      boolean isReady()
      Returns true if and only if Iterator.hasNext() and Iterator.next() will not require an expensive operation.
    • prefetch

      void prefetch()
      If not isReady(), schedules the next expensive operation such that at some point in time in the future isReady() will return true.