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 T
get()
Returns this reference object's referent.long
getLastAccess()
Get pseudo time of last access to this cache pagePack
getPack()
Get thePack
the referenced cache page is allocated forlong
getPosition()
Get the position of the referenced cache page in thePack
int
getSize()
Get size of cache pageboolean
isStrongRef()
Whether this is a strong reference.boolean
kill()
Kill this refvoid
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 returnsnull
.- 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 thePack
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 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:
true
if this is a strong reference
-
-