V
- the type of value that is stored in the cache.public static class DefaultCache.Entry<V> extends Object
value
stored in the cache as well as
creationTimeMillis
and lastAccessTimeMillis
metadata about the entry itself. The creationTimeMillis
and lastAccessTimeMillis
values are used
to support expunging cache entries based on
timeToIdle
and
timeToLive
settings, respectively.Constructor and Description |
---|
Entry(V value)
Creates a new Entry instance wrapping the specified
value , defaulting both the
creationTimeMillis and the lastAccessTimeMills
to the current timestamp (i.e. |
Modifier and Type | Method and Description |
---|---|
long |
getCreationTimeMillis()
Returns the creation time in millis since Epoch when this
Entry instance was created. |
long |
getLastAccessTimeMillis()
Returns the time in millis since Epoch when this
Entry instance was last accessed. |
V |
getValue()
Returns the actual value stored in the cache.
|
public Entry(V value)
value
, defaulting both the
creationTimeMillis
and the lastAccessTimeMills
to the current timestamp (i.e. System.currentTimeMillis()
).value
- the cache entry to store.public V getValue()
public long getCreationTimeMillis()
Entry
instance was created. This is used to
support expunging cache entries when this value is older than the cache's
timeToLive
setting.Entry
instance was created.public long getLastAccessTimeMillis()
Entry
instance was last accessed. This is used to
support expunging cache entries when this value is older than the cache's
timeToIdle
setting.Entry
instance was last accessed.Copyright © 2017–2023 Okta. All rights reserved.