Class ClientCacheEntry<K,V>

java.lang.Object
com.scaleout.client.caching.ClientCacheEntry<K,V>
Type Parameters:
K - the key type
V - the value type

public abstract class ClientCacheEntry<K,V> extends Object
The ClientCacheEntry is an element in a ClientCache.
  • Field Details

    • _key

      protected K _key
      The key.
    • _value

      protected V _value
      The value.
    • _serializedValueSize

      protected int _serializedValueSize
      The serialized size (in bytes).
    • _versionToken

      protected VersionToken _versionToken
      The version token.
    • _lockToken

      protected LockToken _lockToken
      The lock token.
    • _timestamp

      protected long _timestamp
      the timewhen this entry was created.
  • Constructor Details

    • ClientCacheEntry

      public ClientCacheEntry()
      Default constructor.
  • Method Details

    • getValue

      public V getValue()
      Retrieve the entries value.
      Returns:
      the value.
    • getKey

      public K getKey()
      Retrieve the entries key.
      Returns:
      the key.
    • size

      public int size()
      Retrieve the size of the object (in bytes).
      Returns:
      the size
    • getLockToken

      public LockToken getLockToken()
      Retrieve the version token.
      Returns:
      the version token.
    • getVersionToken

      public VersionToken getVersionToken()
      Retrieve the lock token
      Returns:
      the lock token.
    • getTimestamp

      public long getTimestamp()
      Retrieve the timestamp of this entry. By default, the timestamp is the unix epoch.
      Returns:
      the timestamp of this entry.