Interface WindowCache.PageRef<T>

All Known Implementing Classes:
WindowCache.SoftRef, WindowCache.StrongRef
Enclosing class:
WindowCache

private static interface WindowCache.PageRef<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Returns this reference object's referent.
    long
    Get pseudo time of last access to this cache page
    Get the Pack the referenced cache page is allocated for
    long
    Get the position of the referenced cache page in the Pack
    int
    Get size of cache page
    boolean
    Whether this is a strong reference.
    boolean
    Kill this ref
    void
    setLastAccess(long time)
    Set pseudo time of last access to this cache page
  • Method Details

    • 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

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

      long getPosition()
      Get the position of the referenced cache page in the Pack
      Returns:
      the position of the referenced cache page in the Pack
    • 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