Interface WindowCache.PageRef<T>
-
- All Known Implementing Classes:
WindowCache.SoftRef,WindowCache.StrongRef
- Enclosing class:
- WindowCache
private static interface WindowCache.PageRef<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Returns this reference object's referent.longgetLastAccess()Get pseudo time of last access to this cache pagePackgetPack()Get thePackthe referenced cache page is allocated forlonggetPosition()Get the position of the referenced cache page in thePackintgetSize()Get size of cache pagebooleanisStrongRef()Whether this is a strong reference.booleankill()Kill this refvoidsetLastAccess(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 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
-
-