|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
V
- public static interface Store.ValueHolder<V>
Holds both a value, and all the metadata associated with a mapping in a Store.
Field Summary | |
---|---|
static long |
NO_EXPIRE
|
Method Summary | |
---|---|
long |
creationTime(java.util.concurrent.TimeUnit unit)
Accessor to the creation time of this ValueHolder |
long |
expirationTime(java.util.concurrent.TimeUnit unit)
Accessor to the expiration time of this ValueHolder |
long |
getId()
The combination of this identifier and the key that ValueHolder is mapped to should to be
unique at a given time. |
float |
hitRate(long now,
java.util.concurrent.TimeUnit unit)
Accessor to the hit rate of the Value held in this ValueHolder? |
long |
hits()
|
boolean |
isExpired(long expirationTime,
java.util.concurrent.TimeUnit unit)
Check if the ValueHolder is expired relative to the specified time |
long |
lastAccessTime(java.util.concurrent.TimeUnit unit)
Accessor to the last access time of the Value held in this ValueHolder |
V |
value()
Accessor to the value held by this mapping. |
Field Detail |
---|
static final long NO_EXPIRE
Method Detail |
---|
V value()
java.lang.Exception
- when something goes wrong... e.g. deserialization?long creationTime(java.util.concurrent.TimeUnit unit)
unit
- the timeUnit to return the creation time in
long expirationTime(java.util.concurrent.TimeUnit unit)
unit
- the timeUnit to return the creation time in
NO_EXPIRE
means that the ValueHolder will never expire.boolean isExpired(long expirationTime, java.util.concurrent.TimeUnit unit)
expirationTime
- the expiration time relative to which the expiry check must be madeunit
- the unit of the expiration time
long lastAccessTime(java.util.concurrent.TimeUnit unit)
unit
- the timeUnit to return the last access time in
float hitRate(long now, java.util.concurrent.TimeUnit unit)
now
- the time in TimeUnit.MILLISECONDS
upto which the rate needs to be calculatedunit
- the TimeUnit
in which the rate is to returned
long hits()
long getId()
key
that ValueHolder is mapped to should to be
unique at a given time.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |