|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ehcache.spi.cache.AbstractValueHolder<V>
public abstract class AbstractValueHolder<V>
Field Summary |
---|
Fields inherited from interface org.ehcache.spi.cache.Store.ValueHolder |
---|
NO_EXPIRE |
Constructor Summary | |
---|---|
protected |
AbstractValueHolder(long id,
long creationTime)
|
protected |
AbstractValueHolder(long id,
long creationTime,
long expirationTime)
|
Method Summary | |
---|---|
void |
accessed(long now,
Duration expiration)
|
long |
creationTime(java.util.concurrent.TimeUnit unit)
Accessor to the creation time of this ValueHolder |
boolean |
equals(java.lang.Object obj)
|
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. |
int |
hashCode()
|
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 |
protected abstract java.util.concurrent.TimeUnit |
nativeTimeUnit()
|
void |
setExpirationTime(long expirationTime,
java.util.concurrent.TimeUnit unit)
|
protected void |
setHits(long hits)
|
void |
setLastAccessTime(long lastAccessTime,
java.util.concurrent.TimeUnit unit)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.ehcache.spi.cache.Store.ValueHolder |
---|
value |
Constructor Detail |
---|
protected AbstractValueHolder(long id, long creationTime)
protected AbstractValueHolder(long id, long creationTime, long expirationTime)
Method Detail |
---|
protected abstract java.util.concurrent.TimeUnit nativeTimeUnit()
public long creationTime(java.util.concurrent.TimeUnit unit)
Store.ValueHolder
creationTime
in interface Store.ValueHolder<V>
unit
- the timeUnit to return the creation time in
public void setExpirationTime(long expirationTime, java.util.concurrent.TimeUnit unit)
public void accessed(long now, Duration expiration)
public long expirationTime(java.util.concurrent.TimeUnit unit)
Store.ValueHolder
expirationTime
in interface Store.ValueHolder<V>
unit
- the timeUnit to return the creation time in
Store.ValueHolder.NO_EXPIRE
means that the ValueHolder will never expire.public boolean isExpired(long expirationTime, java.util.concurrent.TimeUnit unit)
Store.ValueHolder
isExpired
in interface Store.ValueHolder<V>
expirationTime
- the expiration time relative to which the expiry check must be madeunit
- the unit of the expiration time
public long lastAccessTime(java.util.concurrent.TimeUnit unit)
Store.ValueHolder
lastAccessTime
in interface Store.ValueHolder<V>
unit
- the timeUnit to return the last access time in
public void setLastAccessTime(long lastAccessTime, java.util.concurrent.TimeUnit unit)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public float hitRate(long now, java.util.concurrent.TimeUnit unit)
Store.ValueHolder
hitRate
in interface Store.ValueHolder<V>
now
- the time in TimeUnit.MILLISECONDS
upto which the rate needs to be calculatedunit
- the TimeUnit
in which the rate is to returned
public long hits()
hits
in interface Store.ValueHolder<V>
protected void setHits(long hits)
public long getId()
Store.ValueHolder
key
that ValueHolder is mapped to should to be
unique at a given time.
getId
in interface Store.ValueHolder<V>
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |