public interface EvictableEntry<K,V> extends javax.cache.Cache.Entry<K,V>
EvictionPolicy
.Modifier and Type | Method and Description |
---|---|
<T> T |
addMeta(T val)
Adds a new metadata.
|
boolean |
evict()
Evicts entry associated with given key from cache.
|
boolean |
isCached()
Checks whether entry is currently present in cache or not.
|
<T> T |
meta()
Gets metadata added by eviction policy.
|
<T> T |
putMetaIfAbsent(T val)
Adds given metadata value only if it was absent.
|
<T> T |
removeMeta()
Removes metadata by name.
|
<T> boolean |
removeMeta(T val)
Removes metadata only if its current value is equal to
val passed in. |
<T> boolean |
replaceMeta(T curVal,
T newVal)
Replaces given metadata with new
newVal value only if its current value
is equal to curVal . |
int |
size()
Returns entry size in bytes.
|
boolean evict()
True
if entry could be evicted, false
otherwise.boolean isCached()
false
is returned. In this case all
operations on this entry will cause creation of a new entry in cache.True
if entry is in cache, false
otherwise.int size()
<T> T meta()
null
if no metadata was added by eviction policy.<T> T addMeta(T val)
val
- Metadata value.null
if there was none.<T> T putMetaIfAbsent(T val)
val
- Value to add if it's not attached already.null
if new value was put, or current value if put didn't happen.<T> boolean replaceMeta(T curVal, T newVal)
newVal
value only if its current value
is equal to curVal
. Otherwise, it is no-op.curVal
- Current value to check.newVal
- New value.true
if replacement occurred, false
otherwise.<T> T removeMeta()
null
if no metadata was added by eviction policy.<T> boolean removeMeta(T val)
val
passed in.val
- Value to compare.True
if value was removed, false
otherwise.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024