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()
@Nullable <T> T meta()
T
- Type of the metadata value.null
.@Nullable <T> T addMeta(T val)
T
- Type of the metadata value.val
- Metadata value.null
if there was none.@Nullable <T> T putMetaIfAbsent(T val)
T
- Type of the metadata value.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.T
- Type of the metadata value.curVal
- Current value to check.newVal
- New value.true
if replacement occurred, false
otherwise.@Nullable <T> T removeMeta()
T
- Type of the metadata value.null
.<T> boolean removeMeta(T val)
val
passed in.T
- Type of the metadata value.val
- Value to compare.True
if value was removed, false
otherwise.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023