public static class DiskStorageFactory.DiskMarker extends DiskStorageFactory.DiskSubstitute implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private long |
expiry |
private long |
hitCount |
private java.lang.Object |
key |
private long |
position |
private int |
size |
onHeapSize
Constructor and Description |
---|
DiskMarker(DiskStorageFactory factory,
long position,
int size,
Element element)
Create a new marker tied to the given factory instance.
|
DiskMarker(DiskStorageFactory factory,
long position,
int size,
java.lang.Object key,
long hits)
Create a new marker tied to the given factory instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) long |
getExpirationTime()
Return the time at which this marker expires.
|
(package private) long |
getHitCount()
Number of hits on this Element.
|
(package private) java.lang.Object |
getKey()
Key to which this Element is mapped.
|
private long |
getPosition()
Disk offset at which this element is stored.
|
int |
getSize()
Returns the size of the currently occupying element.
|
(package private) void |
hit(Element e)
Increment statistic associated with a hit on this cache.
|
void |
installed()
Mark the disk substitute as installed
|
bindFactory, getFactory
private final java.lang.Object key
private final long position
private final int size
private volatile long hitCount
private volatile long expiry
DiskMarker(DiskStorageFactory factory, long position, int size, Element element)
factory
- factory responsible for this markerposition
- position on disk where the element will be storedsize
- size of the serialized elementelement
- element being storedDiskMarker(DiskStorageFactory factory, long position, int size, java.lang.Object key, long hits)
factory
- factory responsible for this markerposition
- position on disk where the element will be storedsize
- size of the serialized elementkey
- key to which this element is mappedhits
- hit count for this elementjava.lang.Object getKey()
getKey
in class DiskStorageFactory.DiskSubstitute
long getHitCount()
getHitCount
in class DiskStorageFactory.DiskSubstitute
private long getPosition()
public int getSize()
public void installed()
A No-Op
installed
in class DiskStorageFactory.DiskSubstitute
long getExpirationTime()
getExpirationTime
in class DiskStorageFactory.DiskSubstitute
void hit(Element e)
e
- element deserialized from disk