Class DefaultCache.Entry<V>

java.lang.Object
com.okta.sdk.impl.cache.DefaultCache.Entry<V>
Type Parameters:
V - the type of value that is stored in the cache.
Enclosing class:
DefaultCache<K,V>

public static class DefaultCache.Entry<V> extends Object
An Entry is a wrapper that encapsulates the actual 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 Details

  • Method Details

    • getValue

      public V getValue()
      Returns the actual value stored in the cache.
      Returns:
      the actual value stored in the cache.
    • getCreationTimeMillis

      public long getCreationTimeMillis()
      Returns the creation time in millis since Epoch when this Entry instance was created. This is used to support expunging cache entries when this value is older than the cache's timeToLive setting.
      Returns:
      the creation time in millis since Epoch when this Entry instance was created.
    • getLastAccessTimeMillis

      public long getLastAccessTimeMillis()
      Returns the time in millis since Epoch when this Entry instance was last accessed. This is used to support expunging cache entries when this value is older than the cache's timeToIdle setting.
      Returns:
      the time in millis since Epoch when this Entry instance was last accessed.