Interface WindowCache.PageRef<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T get()
      Returns this reference object's referent.
      long getLastAccess()
      Get pseudo time of last access to this cache page
      PackFile getPack()
      Get the packfile the referenced cache page is allocated for
      long getPosition()
      Get the position of the referenced cache page in the packfile
      int getSize()
      Get size of cache page
      boolean isStrongRef()
      Whether this is a strong reference.
      boolean kill()
      Kill this ref
      void setLastAccess​(long time)
      Set pseudo time of last access to this cache page
    • Method Detail

      • get

        T get()
        Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
        Returns:
        The object to which this reference refers, or null if this reference object has been cleared
      • kill

        boolean kill()
        Kill this ref
        Returns:
        true if this reference object was successfully killed; false if it was already killed
      • getPack

        PackFile getPack()
        Get the packfile the referenced cache page is allocated for
        Returns:
        the packfile the referenced cache page is allocated for
      • getPosition

        long getPosition()
        Get the position of the referenced cache page in the packfile
        Returns:
        the position of the referenced cache page in the packfile
      • getSize

        int getSize()
        Get size of cache page
        Returns:
        size of cache page
      • getLastAccess

        long getLastAccess()
        Get pseudo time of last access to this cache page
        Returns:
        pseudo time of last access to this cache page
      • setLastAccess

        void setLastAccess​(long time)
        Set pseudo time of last access to this cache page
        Parameters:
        time - pseudo time of last access to this cache page
      • isStrongRef

        boolean isStrongRef()
        Whether this is a strong reference.
        Returns:
        true if this is a strong reference