private static class WindowCache.StrongRef extends java.lang.Object implements WindowCache.PageRef<ByteWindow>
| Modifier and Type | Field and Description |
|---|---|
private long |
lastAccess |
private PackFile |
pack |
private long |
position |
private WindowCache.CleanupQueue |
queue |
private ByteWindow |
referent |
private int |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
StrongRef(PackFile pack,
long position,
ByteWindow v,
WindowCache.CleanupQueue queue) |
| Modifier and Type | Method and Description |
|---|---|
ByteWindow |
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
|
private ByteWindow referent
private final PackFile pack
private final long position
private final int size
private long lastAccess
private WindowCache.CleanupQueue queue
protected StrongRef(PackFile pack, long position, ByteWindow v, WindowCache.CleanupQueue queue)
public PackFile getPack()
WindowCache.PageRefgetPack in interface WindowCache.PageRef<ByteWindow>public long getPosition()
WindowCache.PageRefgetPosition in interface WindowCache.PageRef<ByteWindow>public int getSize()
WindowCache.PageRefgetSize in interface WindowCache.PageRef<ByteWindow>public long getLastAccess()
WindowCache.PageRefgetLastAccess in interface WindowCache.PageRef<ByteWindow>public void setLastAccess(long time)
WindowCache.PageRefsetLastAccess in interface WindowCache.PageRef<ByteWindow>time - pseudo time of last access to this cache pagepublic ByteWindow get()
WindowCache.PageRefnull.get in interface WindowCache.PageRef<ByteWindow>null if this reference object has been clearedpublic boolean kill()
WindowCache.PageRefkill in interface WindowCache.PageRef<ByteWindow>true if this reference object was successfully
killed; false if it was already killedpublic boolean isStrongRef()
WindowCache.PageRefisStrongRef in interface WindowCache.PageRef<ByteWindow>true if this is a strong reference