Class HugeCursor.PagedCursor<Array>

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Enclosing class:
    HugeCursor<Array>

    public static final class HugeCursor.PagedCursor<Array>
    extends HugeCursor<Array>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Releases the reference to the underlying array so that it might be garbage collected.
      boolean next()
      Try to load the next page and return the success of this load.
      void setPages​(Array[] pages)  
      void setPages​(Array[] pages, long capacity)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PagedCursor

        public PagedCursor​(Array[] pages)
      • PagedCursor

        public PagedCursor​(long capacity,
                           Array[] pages)
    • Method Detail

      • setPages

        public void setPages​(Array[] pages)
      • setPages

        public void setPages​(Array[] pages,
                             long capacity)
      • next

        public boolean next()
        Description copied from class: HugeCursor
        Try to load the next page and return the success of this load. Once the method returns false, this method will never return true again until the cursor is reset. The cursor behavior is not defined and might be unusable and throw exceptions after this method returns false.
        Specified by:
        next in class HugeCursor<Array>
        Returns:
        true, iff the cursor is still valid on contains new data; false if there is no more data.
      • close

        public void close()
        Description copied from class: HugeCursor
        Releases the reference to the underlying array so that it might be garbage collected. The cursor can never be used again after calling this method, doing so results in undefined behavior.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in class HugeCursor<Array>