public interface AttributesMutator<K,V>
AttributesFactory
before creating the region instead of using an AttributesMutator
after region
creation. This will avoid a potential performance penalty due to the additional network traffic.
The setter methods all return the previous value of the attribute.
Region.getAttributesMutator()
,
RegionAttributes
,
AttributesFactory
Modifier and Type | Method and Description |
---|---|
void |
addAsyncEventQueueId(String asyncEventQueueId)
Adds AsyncEventQueueId to the list of AsyncEventQueueId of the region.
|
void |
addCacheListener(CacheListener<K,V> aListener)
Adds a cache listener to the end of the list of cache listeners on this region.
|
void |
addGatewaySenderId(String gatewaySenderId)
Adds GatewaySenderId to the list of GatewaySenderIds of the region.
|
boolean |
getCloningEnabled()
Returns whether or not cloning is enabled on region
|
EvictionAttributesMutator |
getEvictionAttributesMutator()
Allows changing the eviction controller attributes for the region.
|
Region<K,V> |
getRegion()
Returns the Region whose attributes this mutator affects.
|
void |
initCacheListeners(CacheListener<K,V>[] newListeners)
Removes all cache listeners, calling
CacheCallback.close() on each of them, and then adds
each listener in the specified array. |
void |
removeAsyncEventQueueId(String asyncEventQueueId)
Removes AsyncEventQueueId from the list of AsyncEventQueuesId of the region.
|
void |
removeCacheListener(CacheListener<K,V> aListener)
Removes a cache listener from the list of cache listeners on this region.
|
void |
removeGatewaySenderId(String gatewaySenderId)
Removes GatewaySenderId from the list of GatewaySenderIds of the region.
|
CacheLoader<K,V> |
setCacheLoader(CacheLoader<K,V> cacheLoader)
Changes the cache loader for the region.
|
CacheWriter<K,V> |
setCacheWriter(CacheWriter<K,V> cacheWriter)
Changes the cache writer for the region.
|
void |
setCloningEnabled(boolean cloningEnable)
Sets cloning on region Note: off-heap regions always behave as if cloning is enabled.
|
CustomExpiry<K,V> |
setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
Changes the CustomExpiry for idleTimeout for values in the region
|
CustomExpiry<K,V> |
setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
Changes the custom timeToLive for values in this region
|
ExpirationAttributes |
setEntryIdleTimeout(ExpirationAttributes idleTimeout)
Changes the idleTimeout expiration attributes for values in the region.
|
ExpirationAttributes |
setEntryTimeToLive(ExpirationAttributes timeToLive)
Changes the timeToLive expiration attributes for values in this region.
|
ExpirationAttributes |
setRegionIdleTimeout(ExpirationAttributes idleTimeout)
Changes the idleTimeout expiration attributes for the region as a whole.
|
ExpirationAttributes |
setRegionTimeToLive(ExpirationAttributes timeToLive)
Changes the timeToLive expiration attributes for the region as a whole
|
Region<K,V> getRegion()
ExpirationAttributes setRegionTimeToLive(ExpirationAttributes timeToLive)
timeToLive
- the expiration attributes for the region timeToLiveIllegalArgumentException
- if timeToLive is null or if the ExpirationAction is
LOCAL_INVALIDATE and the region is replicated
IllegalStateException
- if statistics are disabled for this region.ExpirationAttributes setRegionIdleTimeout(ExpirationAttributes idleTimeout)
CacheStatistics.getLastAccessedTime()
for the region.idleTimeout
- the ExpirationAttributes for this region idleTimeoutIllegalArgumentException
- if idleTimeout is null or if the ExpirationAction is
LOCAL_INVALIDATE and the region is replicated
IllegalStateException
- if statistics are disabled for this region.ExpirationAttributes setEntryTimeToLive(ExpirationAttributes timeToLive)
timeToLive
- the timeToLive expiration attributes for entriesIllegalArgumentException
- if timeToLive is null or if the ExpirationAction is
LOCAL_DESTROY and the region is replicated
or if the
ExpirationAction is LOCAL_INVALIDATE and the region is
replicated
IllegalStateException
- if statistics are disabled for this region.CustomExpiry<K,V> setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
custom
- the new CustomExpiryExpirationAttributes setEntryIdleTimeout(ExpirationAttributes idleTimeout)
idleTimeout
- the idleTimeout expiration attributes for entriesIllegalArgumentException
- if idleTimeout is null or if the ExpirationAction is
LOCAL_DESTROY and the region is replicated
or if the
the ExpirationAction is LOCAL_INVALIDATE and the region is
replicated
IllegalStateException
- if statistics are disabled for this region.AttributesFactory.setStatisticsEnabled(boolean)
CustomExpiry<K,V> setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
custom
- the new CustomExpiryvoid addCacheListener(CacheListener<K,V> aListener)
aListener
- the user defined cache listener to add to the region.IllegalArgumentException
- if aListener
is nullvoid removeCacheListener(CacheListener<K,V> aListener)
CacheCallback.close()
will be called on it; otherwise does nothing.aListener
- the cache listener to remove from the region.IllegalArgumentException
- if aListener
is nullvoid initCacheListeners(CacheListener<K,V>[] newListeners)
CacheCallback.close()
on each of them, and then adds
each listener in the specified array.newListeners
- a possibly null or empty array of listeners to add to this region.IllegalArgumentException
- if the newListeners
array has a null elementCacheWriter<K,V> setCacheWriter(CacheWriter<K,V> cacheWriter)
cacheWriter
- the cache writerCacheLoader<K,V> setCacheLoader(CacheLoader<K,V> cacheLoader)
cacheLoader
- the cache loaderEvictionAttributesMutator getEvictionAttributesMutator()
EvictionAttributesMutator
used to change the EvictionAttributesvoid setCloningEnabled(boolean cloningEnable)
cloningEnable
- boolean specifying if cloning is enabled on the regionboolean getCloningEnabled()
void addGatewaySenderId(String gatewaySenderId)
gatewaySenderId
- the ID of the gateway sender to be addedvoid removeGatewaySenderId(String gatewaySenderId)
gatewaySenderId
- the ID of the gateway sender to be removedvoid addAsyncEventQueueId(String asyncEventQueueId)
asyncEventQueueId
- the ID of the async event queue to be addedvoid removeAsyncEventQueueId(String asyncEventQueueId)
asyncEventQueueId
- the ID of the async event queue to be removed