Class Page.PageReference<K,​V>

  • Enclosing class:
    Page<K,​V>

    public static final class Page.PageReference<K,​V>
    extends java.lang.Object
    A pointer to a page, either in-memory or using a page position.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long count
      The descendant count for this child page.
      (package private) static Page.PageReference EMPTY
      Singleton object used when arrays of PageReference have not yet been filled.
      private Page<K,​V> page
      The page, if in memory, or null.
      private long pos
      The position, if known, or 0.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void clearPageReference()
      Clear if necessary, reference to the actual child Page object, so it can be garbage collected if not actively used elsewhere.
      static <X,​Y>
      Page.PageReference<X,​Y>
      empty()
      Get an empty page reference.
      Page<K,​V> getPage()  
      (package private) long getPos()  
      (package private) void resetPos()
      Re-acquire position from in-memory page.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EMPTY

        static final Page.PageReference EMPTY
        Singleton object used when arrays of PageReference have not yet been filled.
      • pos

        private long pos
        The position, if known, or 0.
      • page

        private Page<K,​V> page
        The page, if in memory, or null.
      • count

        final long count
        The descendant count for this child page.
    • Constructor Detail

      • PageReference

        public PageReference​(Page<K,​V> page)
      • PageReference

        PageReference​(long pos,
                      long count)
      • PageReference

        private PageReference​(Page<K,​V> page,
                              long pos,
                              long count)
    • Method Detail

      • empty

        public static <X,​Y> Page.PageReference<X,​Y> empty()
        Get an empty page reference.
        Type Parameters:
        X - the key class
        Y - the value class
        Returns:
        the page reference
      • getPage

        public Page<K,​V> getPage()
      • clearPageReference

        void clearPageReference()
        Clear if necessary, reference to the actual child Page object, so it can be garbage collected if not actively used elsewhere. Reference is cleared only if corresponding page was already saved on a disk.
      • getPos

        long getPos()
      • resetPos

        void resetPos()
        Re-acquire position from in-memory page.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object