private static class WindowCache.SoftRef extends java.lang.ref.SoftReference<ByteWindow> implements WindowCache.PageRef<ByteWindow>
| Modifier and Type | Field and Description |
|---|---|
private long |
lastAccess |
private PackFile |
pack |
private long |
position |
private int |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
SoftRef(PackFile pack,
long position,
ByteWindow v,
WindowCache.SoftCleanupQueue queue) |
| Modifier and Type | Method and Description |
|---|---|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetprivate final PackFile pack
private final long position
private final int size
private long lastAccess
protected SoftRef(PackFile pack, long position, ByteWindow v, WindowCache.SoftCleanupQueue 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 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