Interface PrefetchableIterator<T>

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

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isReady()
      Returns true if and only if Iterator.hasNext() and Iterator.next() will not require an expensive operation.
      void prefetch()
      If not isReady(), schedules the next expensive operation such that at some point in time in the future isReady() will return true.
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Method Detail

      • 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.