Cache.createRegionFactory(RegionShortcut) or
ClientCache.createClientRegionFactory(ClientRegionShortcut) instead.@Deprecated public class AttributesFactory<K,V> extends Object
RegionAttributes. An AttributesFactory instance maintains
state for creating RegionAttributes instances. The setter methods are used to change the
settings that will be used for creating the next attributes instance with the create()
method. If you create a factory with the default constructor, then the factory is set up to
create attributes with all default settings. You can also create a factory by providing a
RegionAttributes, which will set up the new factory with the settings provided in that
attributes instance.
Once a RegionAttributes is created, it can only be modified after it has been used to
create a Region, and then only by using an AttributesMutator obtained from the
region.
CacheLoader [default: null, meaning no loader]setCacheLoader(org.apache.geode.cache.CacheLoader<K, V>) RegionAttributes.getCacheLoader()
AttributesMutator.setCacheLoader(org.apache.geode.cache.CacheLoader<K, V>)CacheWriter [default: null, meaning no writer]setCacheWriter(org.apache.geode.cache.CacheWriter<K, V>) RegionAttributes.getCacheWriter()
AttributesMutator.setCacheWriter(org.apache.geode.cache.CacheWriter<K, V>)CacheListener [default: null, meaning no listener ]addCacheListener(org.apache.geode.cache.CacheListener<K, V>) initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[]) initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[])
RegionAttributes.getCacheListeners() AttributesMutator.initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[])
AttributesMutator.addCacheListener(org.apache.geode.cache.CacheListener<K, V>) AttributesMutator.removeCacheListener(org.apache.geode.cache.CacheListener<K, V>)lastModifiedTime.setRegionTimeToLive(org.apache.geode.cache.ExpirationAttributes) RegionAttributes.getRegionTimeToLive()
AttributesMutator.setRegionTimeToLive(org.apache.geode.cache.ExpirationAttributes)lastAccessedTime.setRegionIdleTimeout(org.apache.geode.cache.ExpirationAttributes) RegionAttributes.getRegionIdleTimeout()
AttributesMutator.setRegionIdleTimeout(org.apache.geode.cache.ExpirationAttributes)lastModifiedTime.setEntryTimeToLive(org.apache.geode.cache.ExpirationAttributes) RegionAttributes.getEntryTimeToLive()
AttributesMutator.setEntryTimeToLive(org.apache.geode.cache.ExpirationAttributes)lastAccessedTime.setEntryIdleTimeout(org.apache.geode.cache.ExpirationAttributes) RegionAttributes.getEntryIdleTimeout()
AttributesMutator.setEntryIdleTimeout(org.apache.geode.cache.ExpirationAttributes)Scope[default: Scope.DISTRIBUTED_NO_ACK]setScope(org.apache.geode.cache.Scope) RegionAttributes.getScope()false]Scope.DISTRIBUTED_ACK are sent after an operation is
processed. If true then remote caches will ACK before processing an operation sent by the
cache that has set earlyAck to true. Note that this attribute is only meaningful on the
cache that is initiating an operation; it does not matter what it is set to on the cache that
receives the operation.setEarlyAck(boolean) RegionAttributes.getEarlyAck()SubscriptionAttributes [default: InterestPolicy.DEFAULT]setSubscriptionAttributes(org.apache.geode.cache.SubscriptionAttributes) RegionAttributes.getSubscriptionAttributes()false]async-distribution-timeout gemfire.property is greater than zero.
AsyncConflation is ignored if the scope is DISTRIBUTED_ACK or GLOBAL. Conflation
is only done on entry update operations. It is done by dropping the earlier update from the
message queue. setEnableAsyncConflation(boolean)
RegionAttributes.getEnableAsyncConflation()null, meaning no pool]null, then it is not a client. If non-null, then the
named pool will be used. setPoolName(java.lang.String) RegionAttributes.getPoolName()false]true, messages will be conflated before they are sent from
a cache server to its clients. Only the latest value will be sent. Note that this attribute is
only meaningful in a client server topology. setEnableSubscriptionConflation(boolean)
RegionAttributes.getEnableSubscriptionConflation()false]setPublisher(boolean)
RegionAttributes.getPublisher()false]Deltas If false, value will not
be cloned setCloningEnabled(boolean) RegionAttributes.getCloningEnabled()DataPolicy [default: DataPolicy.NORMAL]setDataPolicy(org.apache.geode.cache.DataPolicy) RegionAttributes.getDataPolicy()MirrorType [default: MirrorType.NONE]EvictionAttributesEvictionAttributes are the replacement for the deprecated and removed
CapacityController interface. EvictionAttributes describe the EvictionAlgorithm and the
EvictionAction as well as the various conditions under which the algorithm perform the
action e.g. when the maximum number of entries has been reached or the maximum percentage of JVM
heap has been consumed. Setting EvictionAttributes installs an eviction controller on the
Region instantiated with the associated RegionAttributesnull, meaning no constraint]setKeyConstraint(java.lang.Class<K>) RegionAttributes.getKeyConstraint()null, meaning no constraint]valueConstraint is helpful for compiling queries.setValueConstraint(java.lang.Class<V>) RegionAttributes.getValueConstraint()16]HashMap setInitialCapacity(int)
RegionAttributes.getInitialCapacity()0.75]HashMap setLoadFactor(float) RegionAttributes.getLoadFactor()16]setConcurrencyLevel(int) RegionAttributes.getConcurrencyLevel()true]false]setStatisticsEnabled(boolean) RegionAttributes.getStatisticsEnabled()false]null, meaning no disk store]null then this region will write its data to the named DiskStore.setDiskStoreName(java.lang.String) RegionAttributes.getDiskStoreName()true]true then any writes to disk done for this region will be done synchronously. This
means that they will be in the file system buffer before the operation doing the write
returns.false then any writes to disk done for this region will be done asynchronously. This
means that they are queued up to be written and when they are actually written to the file system
buffer is determined by the region's DiskStore configuration. Asynchronous writes will be
conflated if the same entry is written while a previous operation for the same entry is still in
the queue.setDiskSynchronous(boolean) RegionAttributes.isDiskSynchronous()false]setPersistBackup(boolean) RegionAttributes.getPersistBackup()DataPolicy.PERSISTENT_REPLICATE or
DataPolicy.PERSISTENT_PARTITION instead.timeInterval of 1000 and a byteThreshold of 0). rollOplogs is set to true
and maxOplogSize is set to 1024 MB]DiskWriteAttributes setDiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes)
RegionAttributes.getDiskWriteAttributes()setDiskStoreName(java.lang.String) and setDiskSynchronous(boolean)
instead.user.dir
system property)]setDiskDirs(java.io.File[]) RegionAttributes.getDiskDirs()setDiskStoreName(java.lang.String) instead.setDiskDirsAndSizes(java.io.File[], int[]) RegionAttributes.getDiskDirSizes()setDiskStoreName(java.lang.String) instead.PartitionAttributes [default: null, meaning no region
partitioning]setPartitionAttributes(org.apache.geode.cache.PartitionAttributes) RegionAttributes.getPartitionAttributes()MembershipAttributes [default: no required roles]setMembershipAttributes(org.apache.geode.cache.MembershipAttributes) RegionAttributes.getMembershipAttributes()false]setLockGrantor(boolean) RegionAttributes.isLockGrantor() Region.becomeLockGrantor()
false]setIndexMaintenanceSynchronous(boolean) RegionAttributes.getIndexMaintenanceSynchronous()
Note that the RegionAttributes are not distributed with the region.
create()} is called then an IllegalStateException is thrown. See
validateAttributes(org.apache.geode.cache.RegionAttributes<?, ?>).
createSubregion or
createRegion are called, then an IllegalStateException is
thrown.
Scope.LOCAL can only have subregions with Scope.LOCAL.Scope.GLOBAL is illegal if there is any other cache in the distributed system that
has the same region with Scope.DISTRIBUTED_NO_ACK or Scope.DISTRIBUTED_ACK.Scope.DISTRIBUTED_ACK is illegal if there is any other cache in the distributed
system that has the same region with Scope.DISTRIBUTED_NO_ACK or
Scope.GLOBAL.Scope.DISTRIBUTED_NO_ACK is illegal if there is any other cache in the distributed
system that has the same region with Scope.DISTRIBUTED_ACK or Scope.GLOBAL.RegionAttributes,
AttributesMutator,
Region.createSubregion(String, RegionAttributes)| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONCURRENCY_LEVEL
Deprecated.
The default concurrency level for updates to region values
|
static boolean |
DEFAULT_DISK_SYNCHRONOUS
Deprecated.
The default disk synchronous write setting
|
| Constructor and Description |
|---|
AttributesFactory()
Deprecated.
Creates a new instance of AttributesFactory ready to create a
RegionAttributes with
default settings. |
AttributesFactory(RegionAttributes<K,V> regionAttributes)
Deprecated.
Creates a new instance of AttributesFactory ready to create a
RegionAttributes with the
same settings as those in the specified RegionAttributes. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAsyncEventQueueId(String asyncEventQueueId)
Deprecated.
Adds a AsyncEventQueue to the end of list of async event queues on this factory
|
void |
addCacheListener(CacheListener<K,V> aListener)
Deprecated.
Adds a cache listener to the end of the list of cache listeners on this factory.
|
void |
addGatewaySenderId(String gatewaySenderId)
Deprecated.
adds a gateway sender to the end of list of gateway senders on this factory
|
RegionAttributes<K,V> |
create()
Deprecated.
Creates a
RegionAttributes with the current settings. |
RegionAttributes<K,V> |
createRegionAttributes()
Deprecated.
as of GemFire 5.0, use
create() instead |
void |
initCacheListeners(CacheListener<K,V>[] newListeners)
Deprecated.
Removes all cache listeners and then adds each listener in the specified array.
|
protected void |
setBucketRegion(boolean b)
Deprecated.
|
void |
setCacheListener(CacheListener<K,V> aListener)
Deprecated.
as of GemFire 5.0, use
addCacheListener(org.apache.geode.cache.CacheListener<K, V>) instead. |
void |
setCacheLoader(CacheLoader<K,V> cacheLoader)
Deprecated.
Sets the cache loader for the next
RegionAttributes created. |
void |
setCacheWriter(CacheWriter<K,V> cacheWriter)
Deprecated.
Sets the cache writer for the next
RegionAttributes created. |
void |
setCloningEnabled(boolean cloningEnable)
Deprecated.
Sets cloning on region.
|
void |
setCompressor(Compressor compressor)
Deprecated.
Sets this region's compressor for compressing entry values.
|
void |
setConcurrencyChecksEnabled(boolean concurrencyChecksEnabled)
Deprecated.
Enables or disabled concurrent modification checks.
|
void |
setConcurrencyLevel(int concurrencyLevel)
Deprecated.
Sets the concurrency level of the next
RegionAttributes created. |
void |
setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
Deprecated.
Sets the idleTimeout CustomExpiry for the next
RegionAttributes created. |
void |
setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
Deprecated.
Sets the custom timeToLive for the next
RegionAttributes created. |
void |
setDataPolicy(DataPolicy dataPolicy)
Deprecated.
Sets the data policy for the next
RegionAttributes created. |
void |
setDiskDirs(File[] diskDirs)
Deprecated.
as of 6.5 use
DiskStoreFactory.setDiskDirs(java.io.File[]) instead |
void |
setDiskDirsAndSizes(File[] diskDirs,
int[] diskSizes)
Deprecated.
as of 6.5 use
DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[]) instead |
void |
setDiskStoreName(String name)
Deprecated.
Sets the DiskStore name attribute.
|
void |
setDiskSynchronous(boolean isSynchronous)
Deprecated.
Sets whether or not the writing to the disk is synchronous.
|
void |
setDiskWriteAttributes(DiskWriteAttributes attrs)
Deprecated.
as of 6.5 use
setDiskStoreName(java.lang.String) instead |
void |
setEarlyAck(boolean earlyAck)
Deprecated.
This setting no longer has any effect.
|
void |
setEnableAsyncConflation(boolean enableAsyncConflation)
Deprecated.
Sets whether or not conflation is enabled for sending messages to async peers.
|
void |
setEnableBridgeConflation(boolean enableBridgeConflation)
Deprecated.
as of 5.7 use
setEnableSubscriptionConflation(boolean) instead. |
void |
setEnableConflation(boolean enableBridgeConflation)
Deprecated.
as of GemFire 5.0, use
setEnableSubscriptionConflation(boolean) |
void |
setEnableSubscriptionConflation(boolean enableSubscriptionConflation)
Deprecated.
Sets whether or not conflation is enabled for sending messages from a cache server to its
clients.
|
void |
setEntryIdleTimeout(ExpirationAttributes idleTimeout)
Deprecated.
Sets the idleTimeout expiration attributes for region entries for the next
RegionAttributes created. |
void |
setEntryTimeToLive(ExpirationAttributes timeToLive)
Deprecated.
Sets the timeToLive expiration attributes for region entries for the next
RegionAttributes created. |
void |
setEvictionAttributes(EvictionAttributes evictAttrs)
Deprecated.
Sets the EvictionController for the next
RegionAttributes created. |
void |
setIgnoreJTA(boolean flag)
Deprecated.
Sets the flag telling a region to ignore JTA transactions.
|
void |
setIndexMaintenanceSynchronous(boolean synchronous)
Deprecated.
Set how indexes on the region should be maintained.
|
void |
setInitialCapacity(int initialCapacity)
Deprecated.
Sets the entry initial capacity for the next
RegionAttributes created. |
void |
setKeyConstraint(Class<K> keyConstraint)
Deprecated.
Sets the key constraint for the next
RegionAttributes created. |
void |
setLoadFactor(float loadFactor)
Deprecated.
Sets the entry load factor for the next
RegionAttributes created. |
void |
setLockGrantor(boolean isLockGrantor)
Deprecated.
Sets whether this region should become lock grantor.
|
void |
setMembershipAttributes(MembershipAttributes membership)
Deprecated.
this API is scheduled to be removed
|
void |
setMirrorType(MirrorType mirrorType)
Deprecated.
use
setDataPolicy(org.apache.geode.cache.DataPolicy) instead. |
void |
setMulticastEnabled(boolean value)
Deprecated.
Sets whether distributed operations on this region should attempt to use multicast.
|
void |
setOffHeap(boolean offHeap)
Deprecated.
Enables this region's usage of off-heap memory if true.
|
void |
setPartitionAttributes(PartitionAttributes partition)
Deprecated.
Sets the
PartitionAttributes that describe how the region is partitioned among members
of the distributed system. |
void |
setPersistBackup(boolean persistBackup)
Deprecated.
as of GemFire 5.0, use
DataPolicy.PERSISTENT_REPLICATE instead |
void |
setPoolName(String name)
Deprecated.
Sets the pool name attribute.
|
void |
setPublisher(boolean v)
Deprecated.
as of 6.5
|
void |
setRegionIdleTimeout(ExpirationAttributes idleTimeout)
Deprecated.
Sets the idleTimeout expiration attributes for the region itself for the next
RegionAttributes created. |
void |
setRegionTimeToLive(ExpirationAttributes timeToLive)
Deprecated.
Sets the timeToLive expiration attributes for the region itself for the next
RegionAttributes created. |
void |
setScope(Scope scopeType)
Deprecated.
Sets the scope for the next
RegionAttributes created. |
void |
setStatisticsEnabled(boolean statisticsEnabled)
Deprecated.
Sets whether statistics are enabled for this region and its entries.
|
void |
setSubscriptionAttributes(SubscriptionAttributes subscription)
Deprecated.
Sets the
SubscriptionAttributes that describe how the region will subscribe to other
distributed cache instances of the region. |
void |
setValueConstraint(Class<V> valueConstraint)
Deprecated.
Sets the value constraint for the next
RegionAttributes created. |
static void |
validateAttributes(RegionAttributes<?,?> attrs)
Deprecated.
Validates that the attributes are consistent with each other.
|
public static final boolean DEFAULT_DISK_SYNCHRONOUS
Current value: true each.
public static final int DEFAULT_CONCURRENCY_LEVEL
public AttributesFactory()
RegionAttributes with
default settings.public AttributesFactory(RegionAttributes<K,V> regionAttributes)
RegionAttributes with the
same settings as those in the specified RegionAttributes.regionAttributes - the RegionAttributes used to initialize this AttributesFactorypublic void setCacheLoader(CacheLoader<K,V> cacheLoader)
RegionAttributes created.cacheLoader - the cache loader or null if no loaderIllegalStateException - if this region has a pool name setpublic void setCacheWriter(CacheWriter<K,V> cacheWriter)
RegionAttributes created.cacheWriter - the cache writer or null if no cache writerIllegalStateException - if this region has a pool name set@Deprecated public void setCacheListener(CacheListener<K,V> aListener)
addCacheListener(org.apache.geode.cache.CacheListener<K, V>) instead.RegionAttributes created. Any existing cache
listeners on this factory are removed.aListener - a user defined CacheListener, null if no listenerpublic void addCacheListener(CacheListener<K,V> aListener)
aListener - the cache listener to add to the factory.IllegalArgumentException - if aListener is nullpublic void initCacheListeners(CacheListener<K,V>[] newListeners)
newListeners - a possibly null or empty array of listeners to add to this factory.IllegalArgumentException - if the newListeners array has a null elementpublic void setEntryIdleTimeout(ExpirationAttributes idleTimeout)
RegionAttributes created. Default is 0 which indicates no expiration of this type.idleTimeout - the idleTimeout ExpirationAttributes for entries in this regionIllegalArgumentException - if idleTimeout is nullpublic void setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
RegionAttributes created.custom - the CustomExpiry to use; null means none will be used.public void setEntryTimeToLive(ExpirationAttributes timeToLive)
RegionAttributes created. Default is 0 which indicates no expiration of this type.timeToLive - the timeToLive ExpirationAttributes for entries in this regionIllegalArgumentException - if timeToLive is nullpublic void setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
RegionAttributes created.custom - the CustomExpiry to use, none if the default for the region is to be used.public void setRegionIdleTimeout(ExpirationAttributes idleTimeout)
RegionAttributes created. Default is 0 which indicates no expiration of this type is
set.idleTimeout - the ExpirationAttributes for this region idleTimeoutIllegalArgumentException - if idleTimeout is nullpublic void setRegionTimeToLive(ExpirationAttributes timeToLive)
RegionAttributes created. Default is 0 i.e. no expiration of this type.timeToLive - the ExpirationAttributes for this region timeToLiveIllegalArgumentException - if timeToLive is nullpublic void setScope(Scope scopeType)
RegionAttributes created. Default scope is
DISTRIBUTED_NO_ACK. Refer gemfire documentation for more details on this.scopeType - the type of Scope to use for the regionIllegalArgumentException - if scopeType is nullpublic void setEvictionAttributes(EvictionAttributes evictAttrs)
RegionAttributes created. Use one of the
creation methods on EvictionAttributes e.g.
EvictionAttributes.createLRUHeapAttributes() to create the desired instance for this
AttributesFactoryevictAttrs - Explains how and when eviction occurs in the Region.@Deprecated public void setMirrorType(MirrorType mirrorType)
setDataPolicy(org.apache.geode.cache.DataPolicy) instead.RegionAttributes created.mirrorType - The type of mirroring to use for the regionIllegalArgumentException - if mirrorType is nullpublic void setDataPolicy(DataPolicy dataPolicy)
RegionAttributes created. Default data policy is
'Normal'. Please refer gemfire documentation for more details on this.dataPolicy - The data policy to use for the regionIllegalArgumentException - if dataPolicy is nullpublic void setKeyConstraint(Class<K> keyConstraint)
RegionAttributes created. Keys in the region will
be constrained to this class (or subclass). Any attempt to store a key of an incompatible type
in the region will cause a ClassCastException to be thrown.keyConstraint - The Class to constrain the keys to, or null if no constraintIllegalArgumentException - if keyConstraint is a class denoting a primitive typepublic void setValueConstraint(Class<V> valueConstraint)
RegionAttributes created. Values in the region
will be constrained to this class (or subclass). Any attempt to store a value of an
incompatible type in the region will cause a ClassCastException to be thrown.valueConstraint - The Class to constrain the values to, or null if no constraintIllegalArgumentException - if valueConstraint is a class denoting a primitive
typepublic void setInitialCapacity(int initialCapacity)
RegionAttributes created. This value is
used in initializing the map that holds the entries. Default is 16.initialCapacity - the initial capacity of the entry mapIllegalArgumentException - if initialCapacity is negative.HashMappublic void setLoadFactor(float loadFactor)
RegionAttributes created. This value is used in
initializing the map that holds the entries. Default is 0.75.loadFactor - the load factor of the entry mapIllegalArgumentException - if loadFactor is nonpositiveHashMappublic void setConcurrencyLevel(int concurrencyLevel)
RegionAttributes created. This value is used in
initializing the map that holds the entries. Default is 16.concurrencyLevel - the concurrency level of the entry mapIllegalArgumentException - if concurrencyLevel is nonpositivepublic void setConcurrencyChecksEnabled(boolean concurrencyChecksEnabled)
concurrencyChecksEnabled - whether to perform concurrency checks on operations@Deprecated public void setPersistBackup(boolean persistBackup)
DataPolicy.PERSISTENT_REPLICATE insteadpersistBackup - boolean specifying if a persistent backup should be made of the region@Deprecated public void setEarlyAck(boolean earlyAck)
earlyAck - boolean specifying if acks are sent after an operation is processed@Deprecated public void setPublisher(boolean v)
v - boolean specifying if this region should be considered a publisherpublic void setEnableAsyncConflation(boolean enableAsyncConflation)
enableAsyncConflation - boolean specifying if conflation is enabled for sending messages
to async peerspublic void setEnableSubscriptionConflation(boolean enableSubscriptionConflation)
enableSubscriptionConflation - boolean specifying if conflation is enabled for sending
messages from a cache server to its clientspublic void addGatewaySenderId(String gatewaySenderId)
gatewaySenderId - the ID of the gateway sender to be addedIllegalArgumentException - if gatewaySender is nullpublic void addAsyncEventQueueId(String asyncEventQueueId)
asyncEventQueueId - the ID of the async event queue to be addedIllegalArgumentException - if gatewaySender is null@Deprecated public void setEnableBridgeConflation(boolean enableBridgeConflation)
setEnableSubscriptionConflation(boolean) instead.enableBridgeConflation - boolean specifying if conflation is enabled for sending messages
from a cache server to its clients@Deprecated public void setEnableConflation(boolean enableBridgeConflation)
setEnableSubscriptionConflation(boolean)enableBridgeConflation - boolean specifying if conflation is enabled for sending messages
from a cache server to its clients@Deprecated public void setDiskWriteAttributes(DiskWriteAttributes attrs)
setDiskStoreName(java.lang.String) insteadDiskWriteAttributes for this factoryattrs - the DiskWriteAttributes to be set for this factoryRegion.writeToDisk()@Deprecated public void setDiskDirs(File[] diskDirs)
DiskStoreFactory.setDiskDirs(java.io.File[]) insteaddiskDirs - the directories to which the region's data is writtenGemFireIOException - if a directory does not existpublic void setDiskStoreName(String name)
DiskStore.name - the name of the diskstorepublic void setDiskSynchronous(boolean isSynchronous)
isSynchronous - boolean if true indicates synchronous writes@Deprecated public void setDiskDirsAndSizes(File[] diskDirs, int[] diskSizes)
DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[]) insteaddiskDirs - the directories to which the region's data is writtendiskSizes - the size in megabytes for each directoryIllegalArgumentException - if a dir does not exist or the length of the size array does
not match to the length of the dir array or the given size is not a valid positive
numberpublic void setPartitionAttributes(PartitionAttributes partition)
PartitionAttributes that describe how the region is partitioned among members
of the distributed system. This also establishes a data policy of PARTITION, if the data policy has not already been set.partition - the PartitionAttributes that describe how the region is partitioned
among members of the distributed systemprotected void setBucketRegion(boolean b)
@Deprecated public void setMembershipAttributes(MembershipAttributes membership)
MembershipAttributes that describe the membership roles required for reliable
access to the region.membership - the MembershipAttributes that describe the membership roles required
for reliable access to the regionpublic void setSubscriptionAttributes(SubscriptionAttributes subscription)
SubscriptionAttributes that describe how the region will subscribe to other
distributed cache instances of the region.subscription - the SubscriptionAttributes that describe how the region will
subscribe to other distributed cache instances of the regionpublic void setIndexMaintenanceSynchronous(boolean synchronous)
synchronous - boolean specifying if index maintenance on the region should be synchronous
(true) or asynchronous (false)public void setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled - whether statistics are enabledpublic void setIgnoreJTA(boolean flag)
flag - boolean specifying if the region should ignore JTA transactionspublic void setLockGrantor(boolean isLockGrantor)
isLockGrantor - whether this region should become lock grantorpublic void setMulticastEnabled(boolean value)
value - boolean specifying if distributed operations on this region should attempt to use
multicastRegionAttributes.getMulticastEnabled()public void setCloningEnabled(boolean cloningEnable)
cloningEnable - boolean specifying if cloning is enabled on the regionRegionAttributes.getCloningEnabled()public void setPoolName(String name)
If this attribute is set to null or "" then the connection pool is disabled
causing regions that use these attributes to be communicate with peers instead of servers.
The named connection pool must exist on the cache at the time these attributes are used to
create a region. See PoolManager.createFactory() for how to create a connection pool.
name - the name of the connection pool to use; if null or "" then the
connection pool is disabled for regions using these attributes.public void setCompressor(Compressor compressor)
compressor - a compressor.public void setOffHeap(boolean offHeap)
offHeap - boolean flag to enable off-heap memory@Deprecated public RegionAttributes<K,V> createRegionAttributes()
create() insteadRegionAttributes with the current settings.RegionAttributesIllegalStateException - if the current settings violate the
compatibility rulespublic RegionAttributes<K,V> create()
RegionAttributes with the current settings.RegionAttributesIllegalStateException - if the current settings violate the
compatibility rulespublic static void validateAttributes(RegionAttributes<?,?> attrs)
uses replication and the scope is
distributed then the following are incompatible:
DataPolicy.EMPTY data policyEviction is incompatible with the DataPolicy.EMPTY data
policyattrs - the attributes to validateIllegalStateException - if the attributes are not consistent with each other.