K
- the key type determining the type of the lookup values in the cacheV
- the value type determining the type of values stored in the cachepublic class CacheEntry<K,V> extends Object
Such entries are created and managed by the cache implementation. However, via .Cache#getContents()
can be used to access the entries of a cache. These entries provide detailed information for each item in the cache.
Modifier and Type | Field and Description |
---|---|
protected long |
created |
protected Counter |
hits |
protected K |
key |
protected long |
maxAge |
protected long |
nextVerification |
protected long |
used |
protected V |
value |
Modifier and Type | Method and Description |
---|---|
Date |
getCreated()
Returns the timestamp when this entry was created.
|
Counter |
getHits()
Returns the number of "hits" of this entries
|
K |
getKey()
Returns the key associated with this entry
|
Date |
getTtl()
Returns the expiry date of this entry
|
Date |
getUsed()
Returns the timestamp of the last access or use of this entry
|
V |
getValue()
Provides access to the internally stored value
|
String |
toString() |
protected Counter hits
protected long created
protected long used
protected final K key
protected V value
protected long maxAge
protected long nextVerification
public Counter getHits()
public Date getCreated()
public Date getUsed()
public Date getTtl()
@Nullable public V getValue()
public K getKey()
Copyright © 2018. All rights reserved.