Package com.scaleout.client.caching
Class ClientCacheEntry<K,V>
java.lang.Object
com.scaleout.client.caching.ClientCacheEntry<K,V>
- Type Parameters:
K
- the key typeV
- the value type
The
ClientCacheEntry
is an element in a ClientCache
.-
Field Summary
Modifier and TypeFieldDescriptionprotected K
The key.protected LockToken
The lock token.protected int
The serialized size (in bytes).protected long
the timewhen this entry was created.protected V
The value.protected VersionToken
The version token. -
Constructor Summary
-
Method Summary
-
Field Details
-
_key
The key. -
_value
The value. -
_serializedValueSize
protected int _serializedValueSizeThe serialized size (in bytes). -
_versionToken
The version token. -
_lockToken
The lock token. -
_timestamp
protected long _timestampthe timewhen this entry was created.
-
-
Constructor Details
-
ClientCacheEntry
public ClientCacheEntry()Default constructor.
-
-
Method Details
-
getValue
Retrieve the entries value.- Returns:
- the value.
-
getKey
Retrieve the entries key.- Returns:
- the key.
-
size
public int size()Retrieve the size of the object (in bytes).- Returns:
- the size
-
getLockToken
Retrieve the version token.- Returns:
- the version token.
-
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.
-