public static interface Region.Entry<K,V> extends Map.Entry<K,V>
CacheStatistics
.
Unless otherwise noted, all of these methods throw a CacheClosedException
if the
Cache is closed at the time of invocation, or an EntryDestroyedException
if the
entry has been destroyed.
Modifier and Type | Method and Description |
---|---|
K |
getKey()
Returns the key for this entry.
|
Region<K,V> |
getRegion()
Returns the region that contains this entry.
|
CacheStatistics |
getStatistics()
Returns the statistics for this entry.
|
Object |
getUserAttribute()
Returns the user attribute for this entry in the local cache.
|
V |
getValue()
Returns the value of this entry in the local cache.
|
boolean |
isDestroyed()
Returns whether this entry has been destroyed.
|
boolean |
isLocal()
This method checks to see if the entry is in the in-process cache, or is in another process.
|
Object |
setUserAttribute(Object userAttribute)
Sets the user attribute for this entry.
|
V |
setValue(V value)
Sets the value of this entry.
|
comparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCode
K getKey()
V getValue()
CacheLoader
, does not do a netSearch, netLoad, etc.Region<K,V> getRegion()
boolean isLocal()
DataPolicy.PARTITION
may return false in response to this query. A
non-local Entry will not reflect dynamic changes being made to the cache. For instance, the
result of getValue() will not change, even though the cache may have been updated for the
corresponding key. To see an updated snapshot of a non-local Entry, you must fetch the entry
from the Region again.CacheStatistics getStatistics()
StatisticsDisabledException
- if statistics have been disabled for this regionObject getUserAttribute()
Object setUserAttribute(Object userAttribute)
userAttribute
- the user attribute for this entryboolean isDestroyed()
Does not throw a EntryDestroyedException
if this entry has been destroyed.
V setValue(V value)
setValue
in interface Map.Entry<K,V>
value
- Object the value to be setnull
is returned. If the entry was "invalid" then null
is returned. In some cases null
may be returned even if a previous value
exists. If the region is a client proxy then null
is returned. If the
region is off-heap and the old value was stored in off-heap memory then
null
is returned. If the region is partitioned and the setValue is done
on a non-primary then null
is returned. If the value is not currently
stored in memory but is on disk and if the region does not have cqs then
null
is returned.Region.put(Object, Object)