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 TypeMethodDescriptionget()Returns this reference object's referent.longGet pseudo time of last access to this cache pagegetPack()Get thePackthe referenced cache page is allocated forlongGet the position of the referenced cache page in thePackintgetSize()Get size of cache pagebooleanWhether this is a strong reference.booleankill()Kill this refvoidsetLastAccess(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 returnsnull.- Returns:
- The object to which this reference refers, or
nullif this reference object has been cleared
-
kill
boolean kill()Kill this ref- Returns:
trueif this reference object was successfully killed;falseif it was already killed
-
getPack
Pack getPack()Get thePackthe referenced cache page is allocated for- Returns:
- the
Packthe referenced cache page is allocated for
-
getPosition
long getPosition()Get the position of the referenced cache page in thePack- 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:
trueif this is a strong reference
-