org.ehcache
Interface Cache.Entry<K,V>

Type Parameters:
K - the key type
V - the value type
Enclosing interface:
Cache<K,V>

public static interface Cache.Entry<K,V>

Represent a mapping of key to value held in a Cache


Method Summary
 long getCreationTime(java.util.concurrent.TimeUnit unit)
          Accessor to the creation time of this mapping.
 float getHitRate(java.util.concurrent.TimeUnit unit)
          Accessor to the hit rate of this mapping.
 K getKey()
          Accessor to the key of this mapping
 long getLastAccessTime(java.util.concurrent.TimeUnit unit)
          Accessor to the last access time of this mapping.
 V getValue()
          Accessor to the value of this mapping
 

Method Detail

getKey

K getKey()
Accessor to the key of this mapping

Returns:
the key, not null

getValue

V getValue()
Accessor to the value of this mapping

Returns:
the value, not null

getCreationTime

long getCreationTime(java.util.concurrent.TimeUnit unit)
Accessor to the creation time of this mapping.

Parameters:
unit - the timeUnit to return the creation time in
Returns:
the creation time in the specified unit

getLastAccessTime

long getLastAccessTime(java.util.concurrent.TimeUnit unit)
Accessor to the last access time of this mapping.

Parameters:
unit - the timeUnit to return the last access time in
Returns:
the last access time in the specified unit

getHitRate

float getHitRate(java.util.concurrent.TimeUnit unit)
Accessor to the hit rate of this mapping.

Parameters:
unit - the time unit to return the rate in
Returns:
the hit rate in the specified unit