VMware GemFire Java API Reference
Class AttributesFactory<K,V>
- java.lang.Object
-
- org.apache.geode.cache.AttributesFactory<K,V>
-
@Deprecated public class AttributesFactory<K,V> extends java.lang.ObjectDeprecated.as of 6.5 useCache.createRegionFactory(RegionShortcut)orClientCache.createClientRegionFactory(ClientRegionShortcut)instead.Creates instances ofRegionAttributes. AnAttributesFactoryinstance maintains state for creatingRegionAttributesinstances. The setter methods are used to change the settings that will be used for creating the next attributes instance with thecreate()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 aRegionAttributes, which will set up the new factory with the settings provided in that attributes instance.Once a
RegionAttributesis created, it can only be modified after it has been used to create aRegion, and then only by using anAttributesMutatorobtained from the region.Attributes
Callbacks
CacheLoader[default:null, meaning no loader]- User-implemented plug-in for loading data on cache misses.
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]- User-implemented plug-in for intercepting cache modifications, e.g. for writing to an
external data source.
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 ]- User-implemented plug-in for receiving and handling cache related events.
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>)
Expiration
- RegionTimeToLive [default: no expiration]
- Expiration configuration for the entire region based on the
lastModifiedTime.
setRegionTimeToLive(org.apache.geode.cache.ExpirationAttributes)RegionAttributes.getRegionTimeToLive()AttributesMutator.setRegionTimeToLive(org.apache.geode.cache.ExpirationAttributes) - RegionIdleTimeout [default: no expiration]
- Expiration configuration for the entire region based on the
lastAccessedTime.
setRegionIdleTimeout(org.apache.geode.cache.ExpirationAttributes)RegionAttributes.getRegionIdleTimeout()AttributesMutator.setRegionIdleTimeout(org.apache.geode.cache.ExpirationAttributes) - EntryTimeToLive [default: no expiration]
- Expiration configuration for individual entries based on the
lastModifiedTime.
setEntryTimeToLive(org.apache.geode.cache.ExpirationAttributes)RegionAttributes.getEntryTimeToLive()AttributesMutator.setEntryTimeToLive(org.apache.geode.cache.ExpirationAttributes) - EntryIdleTimeout [default: no expiration]
- Expiration configuration for individual entries based on the
lastAccessedTime.
setEntryIdleTimeout(org.apache.geode.cache.ExpirationAttributes)RegionAttributes.getEntryIdleTimeout()AttributesMutator.setEntryIdleTimeout(org.apache.geode.cache.ExpirationAttributes)
Distribution
Scope[default:Scope.DISTRIBUTED_NO_ACK]- Properties of distribution for the region, including whether it is distributed at all,
whether acknowledgements are required, and whether distributed synchronization is required.
setScope(org.apache.geode.cache.Scope)RegionAttributes.getScope() - EarlyAck [default:
false] - Whether or not acks required by
Scope.DISTRIBUTED_ACKare sent after an operation is processed. Iftruethen remote caches will ACK before processing an operation sent by the cache that has set earlyAck totrue. 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]- How will the region in this cache subscribe to other distributed instances of this region.
setSubscriptionAttributes(org.apache.geode.cache.SubscriptionAttributes)RegionAttributes.getSubscriptionAttributes() - EnableAsyncConflation [default:
false] - Whether or not conflation is enabled for sending messages to async peers. Async peers are
those whose
async-distribution-timeoutgemfire.property is greater than zero. AsyncConflation is ignored if the scope isDISTRIBUTED_ACKorGLOBAL. Conflation is only done on entry update operations. It is done by dropping the earlier update from the message queue.setEnableAsyncConflation(boolean)RegionAttributes.getEnableAsyncConflation() - poolName [default:
null, meaning no pool] - Whether or not this region is a client that is to use connections from the named pool to
communicate with servers. If
null, then it is not a client. Ifnon-null, then the named pool will be used.setPoolName(java.lang.String)RegionAttributes.getPoolName() - EnableSubscriptionConflation [default:
false] - Whether or not conflation is enabled for sending messages from a cache server to its clients.
Note: This parameter is only valid for cache server to client communication. It has no effect in
peer to peer communication. If
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() - Publisher [default:
false] - Whether or not a region is a publisher. Publishers are regions that will have distributed
write operations done on them. If a publisher is also a replicate then it will be used as the
preferred source for initializing other replicates.
setPublisher(boolean)RegionAttributes.getPublisher() - isCloningEnabled [default:
false] - Whether or not value is cloned before appling
Deltas Iffalse, value will not be clonedsetCloningEnabled(boolean)RegionAttributes.getCloningEnabled()
Storage (see also package summary )
DataPolicy[default:DataPolicy.NORMAL]- Specifies the data storage policy.
setDataPolicy(org.apache.geode.cache.DataPolicy)RegionAttributes.getDataPolicy() MirrorType[default:MirrorType.NONE]- Deprecated, use DataPolicy instead.
EvictionAttributesEvictionAttributesare the replacement for the deprecated and removed CapacityController interface. EvictionAttributes describe theEvictionAlgorithmand theEvictionActionas 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. SettingEvictionAttributesinstalls an eviction controller on the Region instantiated with the associated RegionAttributes- KeyConstraint [default:
null, meaning no constraint] - The Class to constrain the keys to in the region.
setKeyConstraint(java.lang.Class<K>)RegionAttributes.getKeyConstraint() - ValueConstraint [default:
null, meaning no constraint] - The Class to constrain the values to in the region. In addition to the utility of this for
applications in general, a
valueConstraintis helpful for compiling queries.
setValueConstraint(java.lang.Class<V>)RegionAttributes.getValueConstraint() - InitialCapacity [default:
16] - The initial capacity of the map used for storing the entries.
HashMapsetInitialCapacity(int)RegionAttributes.getInitialCapacity() - LoadFactor [default:
0.75] - The load factor of the map used for storing the entries.
HashMapsetLoadFactor(float)RegionAttributes.getLoadFactor() - ConcurrencyLevel [default:
16] - The allowed concurrency among updates to values in the region is guided by the
concurrencyLevel, which is used as a hint for internal sizing. The actual concurrency will vary. Ideally, you should choose a value to accommodate as many threads as will ever concurrently modify values in the region. Using a significantly higher value than you need can waste space and time, and a significantly lower value can lead to thread contention. But overestimates and underestimates within an order of magnitude do not usually have much noticeable impact. A value of one is appropriate when it is known that only one thread will modify and all others will only read.
setConcurrencyLevel(int)RegionAttributes.getConcurrencyLevel() - ConcurrencyChecksEnabled [default:
true] - Enables a distributed versioning algorithm that detects concurrency conflicts in regions and ensures that changes to an entry are not applied in a different order in other members. This can cause operations to be conflated, so that some cache listeners may see an event while others do not, but it guarantees that the system will be consistent.
- StatisticsEnabled [default:
false] - Whether statistics are enabled for this region. The default is disabled, which conserves on
memory.
setStatisticsEnabled(boolean)RegionAttributes.getStatisticsEnabled() - IgnoreJTA [default:
false] - Whether JTA transactions are ignored for this region. The default is to look for and join JTA transactions for operations performed on a region.
- DiskStoreName [default:
null, meaning no disk store] - If not
nullthen this region will write its data to the namedDiskStore.
setDiskStoreName(java.lang.String)RegionAttributes.getDiskStoreName() - DiskSynchronous [default:
true] - If
truethen 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.
Iffalsethen 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'sDiskStoreconfiguration. 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() - PersistBackup [default:
false] - Whether or not a persistent backup should be made of the region.
setPersistBackup(boolean)RegionAttributes.getPersistBackup() - Deprecated, use
DataPolicy.PERSISTENT_REPLICATEorDataPolicy.PERSISTENT_PARTITIONinstead. - DiskWriteAttributes [default: Asynchronously write to disk every second (a
timeIntervalof 1000 and abyteThresholdof 0).rollOplogsis set to true andmaxOplogSizeis set to 1024 MB] - How region data should be written to disk. Determines whether data should be written
synchronously or asynchronously. Data that is written asynchronously can be written at a certain
time interval or once a certain number of
bytes of data have been enqueued.
DiskWriteAttributessetDiskWriteAttributesRegionAttributes.getDiskWriteAttributes() - Deprecated, use
setDiskStoreName(java.lang.String)andsetDiskSynchronous(boolean)instead. - DiskDirs [default: Current working directory (
user.dirsystem property)] - The directories to which the region's data are written. If multiple directories are used,
GemFire will attempt to distribute the data evenly among them.
setDiskDirsRegionAttributes.getDiskDirs() - Deprecated, use
setDiskStoreName(java.lang.String)instead. - DiskDirSizes [default: 10240 MB]
- The size of the directory to which region's data is written.
setDiskDirsAndSizesRegionAttributes.getDiskDirSizes() - Deprecated, use
setDiskStoreName(java.lang.String)instead. PartitionAttributes[default:null, meaning no region partitioning]- How region data is partitioned among the members of the distributed system.
setPartitionAttributes(org.apache.geode.cache.PartitionAttributes)RegionAttributes.getPartitionAttributes() MembershipAttributes[default: no required roles]- How access to the region is affected when one or more required roles are missing from the
region membership.
setMembershipAttributes(org.apache.geode.cache.MembershipAttributes)RegionAttributes.getMembershipAttributes() - Deprecated, this API is scheduled to be removed
Locking
- LockGrantor [default:
false] - Should this process become lock grantor for the region?
setLockGrantor(boolean)RegionAttributes.isLockGrantor()Region.becomeLockGrantor()Querying
- IndexMaintenanceSynchronous [default:
false] - Are indexes built over in this region updated synchronously when the underlying data is modified?
setIndexMaintenanceSynchronous(boolean)RegionAttributes.getIndexMaintenanceSynchronous()Note that the RegionAttributes are not distributed with the region.
Compatibility Rules
RegionAttributes Creation Constraints
If any of the following compatibility rules are violated whencreate()} is called then anIllegalStateExceptionis thrown. SeevalidateAttributes(org.apache.geode.cache.RegionAttributes<?, ?>).Creation Constraints
Region Creation Constraints on RegionAttributes
If any of the following rules are violated whencreateSubregionorcreateRegionare called, then anIllegalStateExceptionis thrown.- A region with
Scope.LOCALcan only have subregions withScope.LOCAL. Scope.GLOBALis illegal if there is any other cache in the distributed system that has the same region withScope.DISTRIBUTED_NO_ACKorScope.DISTRIBUTED_ACK.Scope.DISTRIBUTED_ACKis illegal if there is any other cache in the distributed system that has the same region withScope.DISTRIBUTED_NO_ACKorScope.GLOBAL.Scope.DISTRIBUTED_NO_ACKis illegal if there is any other cache in the distributed system that has the same region withScope.DISTRIBUTED_ACKorScope.GLOBAL.
- Since:
- GemFire 3.0
- See Also:
RegionAttributes,AttributesMutator,Region.createSubregion(String, RegionAttributes)
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONCURRENCY_LEVELDeprecated.The default concurrency level for updates to region valuesstatic booleanDEFAULT_DISK_SYNCHRONOUSDeprecated.The default disk synchronous write setting
-
Constructor Summary
Constructors Constructor Description AttributesFactory()Deprecated.Creates a new instance of AttributesFactory ready to create aRegionAttributeswith default settings.AttributesFactory(RegionAttributes<K,V> regionAttributes)Deprecated.Creates a new instance of AttributesFactory ready to create aRegionAttributeswith the same settings as those in the specifiedRegionAttributes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAsyncEventQueueId(java.lang.String asyncEventQueueId)Deprecated.Adds a AsyncEventQueue to the end of list of async event queues on this factoryvoidaddCacheListener(CacheListener<K,V> aListener)Deprecated.Adds a cache listener to the end of the list of cache listeners on this factory.voidaddGatewaySenderId(java.lang.String gatewaySenderId)Deprecated.adds a gateway sender to the end of list of gateway senders on this factoryRegionAttributes<K,V>create()Deprecated.Creates aRegionAttributeswith the current settings.RegionAttributes<K,V>createRegionAttributes()Deprecated.as of GemFire 5.0, usecreate()insteadvoidinitCacheListeners(CacheListener<K,V>[] newListeners)Deprecated.Removes all cache listeners and then adds each listener in the specified array.protected voidsetBucketRegion(boolean b)Deprecated.voidsetCacheListener(CacheListener<K,V> aListener)Deprecated.as of GemFire 5.0, useaddCacheListener(org.apache.geode.cache.CacheListener<K, V>)instead.voidsetCacheLoader(CacheLoader<K,V> cacheLoader)Deprecated.Sets the cache loader for the nextRegionAttributescreated.voidsetCacheWriter(CacheWriter<K,V> cacheWriter)Deprecated.Sets the cache writer for the nextRegionAttributescreated.voidsetCloningEnabled(boolean cloningEnable)Deprecated.Sets cloning on region.voidsetCompressor(Compressor compressor)Deprecated.Sets this region's compressor for compressing entry values.voidsetConcurrencyChecksEnabled(boolean concurrencyChecksEnabled)Deprecated.Enables or disabled concurrent modification checks.voidsetConcurrencyLevel(int concurrencyLevel)Deprecated.Sets the concurrency level of the nextRegionAttributescreated.voidsetCustomEntryIdleTimeout(CustomExpiry<K,V> custom)Deprecated.Sets the idleTimeout CustomExpiry for the nextRegionAttributescreated.voidsetCustomEntryTimeToLive(CustomExpiry<K,V> custom)Deprecated.Sets the custom timeToLive for the nextRegionAttributescreated.voidsetDataPolicy(DataPolicy dataPolicy)Deprecated.Sets the data policy for the nextRegionAttributescreated.voidsetDiskDirs(java.io.File[] diskDirs)Deprecated.as of 6.5 useDiskStoreFactory.setDiskDirs(java.io.File[])insteadvoidsetDiskDirsAndSizes(java.io.File[] diskDirs, int[] diskSizes)Deprecated.as of 6.5 useDiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[])insteadvoidsetDiskStoreName(java.lang.String name)Deprecated.Sets the DiskStore name attribute.voidsetDiskSynchronous(boolean isSynchronous)Deprecated.Sets whether or not the writing to the disk is synchronous.voidsetDiskWriteAttributes(DiskWriteAttributes attrs)Deprecated.as of 6.5 usesetDiskStoreName(java.lang.String)insteadvoidsetEarlyAck(boolean earlyAck)Deprecated.This setting no longer has any effect.voidsetEnableAsyncConflation(boolean enableAsyncConflation)Deprecated.Sets whether or not conflation is enabled for sending messages to async peers.voidsetEnableBridgeConflation(boolean enableBridgeConflation)Deprecated.as of 5.7 usesetEnableSubscriptionConflation(boolean)instead.voidsetEnableConflation(boolean enableBridgeConflation)Deprecated.as of GemFire 5.0, usesetEnableSubscriptionConflation(boolean)voidsetEnableSubscriptionConflation(boolean enableSubscriptionConflation)Deprecated.Sets whether or not conflation is enabled for sending messages from a cache server to its clients.voidsetEntryIdleTimeout(ExpirationAttributes idleTimeout)Deprecated.Sets the idleTimeout expiration attributes for region entries for the nextRegionAttributescreated.voidsetEntryTimeToLive(ExpirationAttributes timeToLive)Deprecated.Sets the timeToLive expiration attributes for region entries for the nextRegionAttributescreated.voidsetEntryTimeToLive(ExpirationAttributes timeToLive, TimeToLiveResetPolicy resetPolicy)Deprecated.Sets the timeToLive expiration attributes for region entries for the nextRegionAttributescreated.voidsetEvictionAttributes(EvictionAttributes evictAttrs)Deprecated.Sets the EvictionController for the nextRegionAttributescreated.voidsetIgnoreJTA(boolean flag)Deprecated.Sets the flag telling a region to ignore JTA transactions.voidsetIndexMaintenanceSynchronous(boolean synchronous)Deprecated.Set how indexes on the region should be maintained.voidsetInitialCapacity(int initialCapacity)Deprecated.Sets the entry initial capacity for the nextRegionAttributescreated.voidsetKeyConstraint(java.lang.Class<K> keyConstraint)Deprecated.Sets the key constraint for the nextRegionAttributescreated.voidsetLoadFactor(float loadFactor)Deprecated.Sets the entry load factor for the nextRegionAttributescreated.voidsetLockGrantor(boolean isLockGrantor)Deprecated.Sets whether this region should become lock grantor.voidsetMembershipAttributes(MembershipAttributes membership)Deprecated.this API is scheduled to be removedvoidsetMirrorType(MirrorType mirrorType)Deprecated.usesetDataPolicy(org.apache.geode.cache.DataPolicy)instead.voidsetMulticastEnabled(boolean value)Deprecated.Sets whether distributed operations on this region should attempt to use multicast.voidsetOffHeap(boolean offHeap)Deprecated.Enables this region's usage of off-heap memory if true.voidsetPartitionAttributes(PartitionAttributes partition)Deprecated.Sets thePartitionAttributesthat describe how the region is partitioned among members of the distributed system.voidsetPersistBackup(boolean persistBackup)Deprecated.as of GemFire 5.0, useDataPolicy.PERSISTENT_REPLICATEinsteadvoidsetPoolName(java.lang.String name)Deprecated.Sets the pool name attribute.voidsetPublisher(boolean v)Deprecated.as of 6.5voidsetRegionIdleTimeout(ExpirationAttributes idleTimeout)Deprecated.Sets the idleTimeout expiration attributes for the region itself for the nextRegionAttributescreated.voidsetRegionTimeToLive(ExpirationAttributes timeToLive)Deprecated.Sets the timeToLive expiration attributes for the region itself for the nextRegionAttributescreated.voidsetScope(Scope scopeType)Deprecated.Sets the scope for the nextRegionAttributescreated.voidsetStatisticsEnabled(boolean statisticsEnabled)Deprecated.Sets whether statistics are enabled for this region and its entries.voidsetSubscriptionAttributes(SubscriptionAttributes subscription)Deprecated.Sets theSubscriptionAttributesthat describe how the region will subscribe to other distributed cache instances of the region.voidsetValueConstraint(java.lang.Class<V> valueConstraint)Deprecated.Sets the value constraint for the nextRegionAttributescreated.static voidvalidateAttributes(RegionAttributes<?,?> attrs)Deprecated.Validates that the attributes are consistent with each other.
-
-
-
Field Detail
-
DEFAULT_DISK_SYNCHRONOUS
public static final boolean DEFAULT_DISK_SYNCHRONOUS
Deprecated.The default disk synchronous write settingCurrent value:
trueeach.- Since:
- GemFire 6.5
- See Also:
- Constant Field Values
-
DEFAULT_CONCURRENCY_LEVEL
public static final int DEFAULT_CONCURRENCY_LEVEL
Deprecated.The default concurrency level for updates to region values- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AttributesFactory
public AttributesFactory()
Deprecated.Creates a new instance of AttributesFactory ready to create aRegionAttributeswith default settings.
-
AttributesFactory
public AttributesFactory(RegionAttributes<K,V> regionAttributes)
Deprecated.Creates a new instance of AttributesFactory ready to create aRegionAttributeswith the same settings as those in the specifiedRegionAttributes.- Parameters:
regionAttributes- theRegionAttributesused to initialize this AttributesFactory
-
-
Method Detail
-
setCacheLoader
public void setCacheLoader(CacheLoader<K,V> cacheLoader)
Deprecated.Sets the cache loader for the nextRegionAttributescreated.- Parameters:
cacheLoader- the cache loader or null if no loader- Throws:
java.lang.IllegalStateException- if this region has apool name set
-
setCacheWriter
public void setCacheWriter(CacheWriter<K,V> cacheWriter)
Deprecated.Sets the cache writer for the nextRegionAttributescreated.- Parameters:
cacheWriter- the cache writer or null if no cache writer- Throws:
java.lang.IllegalStateException- if this region has apool name set
-
setCacheListener
@Deprecated public void setCacheListener(CacheListener<K,V> aListener)
Deprecated.as of GemFire 5.0, useaddCacheListener(org.apache.geode.cache.CacheListener<K, V>)instead.Sets the CacheListener for the nextRegionAttributescreated. Any existing cache listeners on this factory are removed.- Parameters:
aListener- a user defined CacheListener, null if no listener
-
addCacheListener
public void addCacheListener(CacheListener<K,V> aListener)
Deprecated.Adds a cache listener to the end of the list of cache listeners on this factory.- Parameters:
aListener- the cache listener to add to the factory.- Throws:
java.lang.IllegalArgumentException- ifaListeneris null- Since:
- GemFire 5.0
-
initCacheListeners
public void initCacheListeners(CacheListener<K,V>[] newListeners)
Deprecated.Removes all cache listeners and then adds each listener in the specified array.- Parameters:
newListeners- a possibly null or empty array of listeners to add to this factory.- Throws:
java.lang.IllegalArgumentException- if thenewListenersarray has a null element- Since:
- GemFire 5.0
-
setEntryIdleTimeout
public void setEntryIdleTimeout(ExpirationAttributes idleTimeout)
Deprecated.Sets the idleTimeout expiration attributes for region entries for the nextRegionAttributescreated. Default is 0 which indicates no expiration of this type.- Parameters:
idleTimeout- the idleTimeout ExpirationAttributes for entries in this region- Throws:
java.lang.IllegalArgumentException- if idleTimeout is null
-
setCustomEntryIdleTimeout
public void setCustomEntryIdleTimeout(CustomExpiry<K,V> custom)
Deprecated.Sets the idleTimeout CustomExpiry for the nextRegionAttributescreated.- Parameters:
custom- the CustomExpiry to use; null means none will be used.
-
setEntryTimeToLive
public void setEntryTimeToLive(ExpirationAttributes timeToLive)
Deprecated.Sets the timeToLive expiration attributes for region entries for the nextRegionAttributescreated. Default is 0 which indicates no expiration of this type.- Parameters:
timeToLive- the timeToLive ExpirationAttributes for entries in this region- Throws:
java.lang.IllegalArgumentException- if timeToLive is null
-
setEntryTimeToLive
public void setEntryTimeToLive(ExpirationAttributes timeToLive, TimeToLiveResetPolicy resetPolicy)
Deprecated.Sets the timeToLive expiration attributes for region entries for the nextRegionAttributescreated. Default is 0 which indicates no expiration of this type. Additionally, this method also allows setting the time to live reset policy.- Parameters:
timeToLive- the timeToLive ExpirationAttributes for entries in this regionresetPolicy- the policy to use which determines whether expiration is relative to the entry's creation time or the last modified time- Throws:
java.lang.IllegalArgumentException- if timeToLive is null- See Also:
TimeToLiveResetPolicy
-
setCustomEntryTimeToLive
public void setCustomEntryTimeToLive(CustomExpiry<K,V> custom)
Deprecated.Sets the custom timeToLive for the nextRegionAttributescreated.- Parameters:
custom- the CustomExpiry to use, none if the default for the region is to be used.
-
setRegionIdleTimeout
public void setRegionIdleTimeout(ExpirationAttributes idleTimeout)
Deprecated.Sets the idleTimeout expiration attributes for the region itself for the nextRegionAttributescreated. Default is 0 which indicates no expiration of this type is set.- Parameters:
idleTimeout- the ExpirationAttributes for this region idleTimeout- Throws:
java.lang.IllegalArgumentException- if idleTimeout is null
-
setRegionTimeToLive
public void setRegionTimeToLive(ExpirationAttributes timeToLive)
Deprecated.Sets the timeToLive expiration attributes for the region itself for the nextRegionAttributescreated. Default is 0 i.e. no expiration of this type.- Parameters:
timeToLive- the ExpirationAttributes for this region timeToLive- Throws:
java.lang.IllegalArgumentException- if timeToLive is null
-
setScope
public void setScope(Scope scopeType)
Deprecated.Sets the scope for the nextRegionAttributescreated. Default scope is DISTRIBUTED_NO_ACK. Refer gemfire documentation for more details on this.- Parameters:
scopeType- the type of Scope to use for the region- Throws:
java.lang.IllegalArgumentException- if scopeType is null
-
setEvictionAttributes
public void setEvictionAttributes(EvictionAttributes evictAttrs)
Deprecated.Sets the EvictionController for the nextRegionAttributescreated. Use one of the creation methods onEvictionAttributese.g.EvictionAttributes.createLRUHeapAttributes()to create the desired instance for thisAttributesFactory- Parameters:
evictAttrs- Explains how and when eviction occurs in the Region.
-
setMirrorType
@Deprecated public void setMirrorType(MirrorType mirrorType)
Deprecated.usesetDataPolicy(org.apache.geode.cache.DataPolicy)instead.Sets the mirror type for the nextRegionAttributescreated.- Parameters:
mirrorType- The type of mirroring to use for the region- Throws:
java.lang.IllegalArgumentException- if mirrorType is null
-
setDataPolicy
public void setDataPolicy(DataPolicy dataPolicy)
Deprecated.Sets the data policy for the nextRegionAttributescreated. Default data policy is 'Normal'. Please refer gemfire documentation for more details on this.- Parameters:
dataPolicy- The data policy to use for the region- Throws:
java.lang.IllegalArgumentException- if dataPolicy is null
-
setKeyConstraint
public void setKeyConstraint(java.lang.Class<K> keyConstraint)
Deprecated.Sets the key constraint for the nextRegionAttributescreated. 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 aClassCastExceptionto be thrown.- Parameters:
keyConstraint- The Class to constrain the keys to, or null if no constraint- Throws:
java.lang.IllegalArgumentException- ifkeyConstraintis a class denoting a primitive type
-
setValueConstraint
public void setValueConstraint(java.lang.Class<V> valueConstraint)
Deprecated.Sets the value constraint for the nextRegionAttributescreated. 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 aClassCastExceptionto be thrown.- Parameters:
valueConstraint- The Class to constrain the values to, or null if no constraint- Throws:
java.lang.IllegalArgumentException- ifvalueConstraintis a class denoting a primitive type
-
setInitialCapacity
public void setInitialCapacity(int initialCapacity)
Deprecated.Sets the entry initial capacity for the nextRegionAttributescreated. This value is used in initializing the map that holds the entries. Default is 16.- Parameters:
initialCapacity- the initial capacity of the entry map- Throws:
java.lang.IllegalArgumentException- if initialCapacity is negative.- See Also:
HashMap
-
setLoadFactor
public void setLoadFactor(float loadFactor)
Deprecated.Sets the entry load factor for the nextRegionAttributescreated. This value is used in initializing the map that holds the entries. Default is 0.75.- Parameters:
loadFactor- the load factor of the entry map- Throws:
java.lang.IllegalArgumentException- if loadFactor is nonpositive- See Also:
HashMap
-
setConcurrencyLevel
public void setConcurrencyLevel(int concurrencyLevel)
Deprecated.Sets the concurrency level of the nextRegionAttributescreated. This value is used in initializing the map that holds the entries. Default is 16.- Parameters:
concurrencyLevel- the concurrency level of the entry map- Throws:
java.lang.IllegalArgumentException- if concurrencyLevel is nonpositive
-
setConcurrencyChecksEnabled
public void setConcurrencyChecksEnabled(boolean concurrencyChecksEnabled)
Deprecated.Enables or disabled concurrent modification checks. Concurrency checks are enabled by default.- Parameters:
concurrencyChecksEnabled- whether to perform concurrency checks on operations- Since:
- GemFire 7.0
-
setPersistBackup
@Deprecated public void setPersistBackup(boolean persistBackup)
Deprecated.as of GemFire 5.0, useDataPolicy.PERSISTENT_REPLICATEinsteadSets whether or not a persistent backup should be made of the region.- Parameters:
persistBackup- boolean specifying if a persistent backup should be made of the region- Since:
- GemFire 3.2
-
setEarlyAck
@Deprecated public void setEarlyAck(boolean earlyAck)
Deprecated.This setting no longer has any effect.Sets whether or not acks are sent after an operation is processed.- Parameters:
earlyAck- boolean specifying if acks are sent after an operation is processed- Since:
- GemFire 4.1
-
setPublisher
@Deprecated public void setPublisher(boolean v)
Deprecated.as of 6.5Sets whether or not this region should be considered a publisher.- Parameters:
v- boolean specifying if this region should be considered a publisher- Since:
- GemFire 4.2.3
-
setEnableAsyncConflation
public void setEnableAsyncConflation(boolean enableAsyncConflation)
Deprecated.Sets whether or not conflation is enabled for sending messages to async peers. Default value is false.- Parameters:
enableAsyncConflation- boolean specifying if conflation is enabled for sending messages to async peers- Since:
- GemFire 4.2.3
-
setEnableSubscriptionConflation
public void setEnableSubscriptionConflation(boolean enableSubscriptionConflation)
Deprecated.Sets whether or not conflation is enabled for sending messages from a cache server to its clients. Default is false.- Parameters:
enableSubscriptionConflation- boolean specifying if conflation is enabled for sending messages from a cache server to its clients- Since:
- GemFire 5.0
-
addGatewaySenderId
public void addGatewaySenderId(java.lang.String gatewaySenderId)
Deprecated.adds a gateway sender to the end of list of gateway senders on this factory- Parameters:
gatewaySenderId- the ID of the gateway sender to be added- Throws:
java.lang.IllegalArgumentException- ifgatewaySenderis null- Since:
- GemFire 7.0
-
addAsyncEventQueueId
public void addAsyncEventQueueId(java.lang.String asyncEventQueueId)
Deprecated.Adds a AsyncEventQueue to the end of list of async event queues on this factory- Parameters:
asyncEventQueueId- the ID of the async event queue to be added- Throws:
java.lang.IllegalArgumentException- ifgatewaySenderis null- Since:
- GemFire 7.0
-
setEnableBridgeConflation
@Deprecated public void setEnableBridgeConflation(boolean enableBridgeConflation)
Deprecated.as of 5.7 usesetEnableSubscriptionConflation(boolean)instead.Sets whether or not conflation is enabled for sending messages from a cache server to its clients.- Parameters:
enableBridgeConflation- boolean specifying if conflation is enabled for sending messages from a cache server to its clients- Since:
- GemFire 5.0
-
setEnableConflation
@Deprecated public void setEnableConflation(boolean enableBridgeConflation)
Deprecated.as of GemFire 5.0, usesetEnableSubscriptionConflation(boolean)Sets whether or not conflation is enabled for sending messages from a cache server to its clients.- Parameters:
enableBridgeConflation- boolean specifying if conflation is enabled for sending messages from a cache server to its clients
-
setDiskWriteAttributes
@Deprecated public void setDiskWriteAttributes(DiskWriteAttributes attrs)
Deprecated.as of 6.5 usesetDiskStoreName(java.lang.String)insteadSets theDiskWriteAttributesfor this factory- Parameters:
attrs- theDiskWriteAttributesto be set for this factory- Since:
- GemFire 3.2
- See Also:
Region.writeToDisk()
-
setDiskDirs
@Deprecated public void setDiskDirs(java.io.File[] diskDirs)
Deprecated.as of 6.5 useDiskStoreFactory.setDiskDirs(java.io.File[])insteadSets the directories with the default size of 10240 MB to which the region's data is written- Parameters:
diskDirs- the directories to which the region's data is written- Throws:
GemFireIOException- if a directory does not exist- Since:
- GemFire 3.2
-
setDiskStoreName
public void setDiskStoreName(java.lang.String name)
Deprecated.Sets the DiskStore name attribute. This causes the region to use theDiskStore.- Parameters:
name- the name of the diskstore- Since:
- GemFire 6.5
-
setDiskSynchronous
public void setDiskSynchronous(boolean isSynchronous)
Deprecated.Sets whether or not the writing to the disk is synchronous. Default is true.- Parameters:
isSynchronous- boolean if true indicates synchronous writes- Since:
- GemFire 6.5
-
setDiskDirsAndSizes
@Deprecated public void setDiskDirsAndSizes(java.io.File[] diskDirs, int[] diskSizes)Deprecated.as of 6.5 useDiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[])insteadSets the directories to which the region's data is written and also set their sizes in megabytes- Parameters:
diskDirs- the directories to which the region's data is writtendiskSizes- the size in megabytes for each directory- Throws:
java.lang.IllegalArgumentException- 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 number- Since:
- GemFire 5.1
-
setPartitionAttributes
public void setPartitionAttributes(PartitionAttributes partition)
Deprecated.Sets thePartitionAttributesthat describe how the region is partitioned among members of the distributed system. This also establishes a data policy ofPARTITION, if the data policy has not already been set.- Parameters:
partition- thePartitionAttributesthat describe how the region is partitioned among members of the distributed system- Since:
- GemFire 5.0
-
setBucketRegion
protected void setBucketRegion(boolean b)
Deprecated.
-
setMembershipAttributes
@Deprecated public void setMembershipAttributes(MembershipAttributes membership)
Deprecated.this API is scheduled to be removedSets theMembershipAttributesthat describe the membership roles required for reliable access to the region.- Parameters:
membership- theMembershipAttributesthat describe the membership roles required for reliable access to the region
-
setSubscriptionAttributes
public void setSubscriptionAttributes(SubscriptionAttributes subscription)
Deprecated.Sets theSubscriptionAttributesthat describe how the region will subscribe to other distributed cache instances of the region.- Parameters:
subscription- theSubscriptionAttributesthat describe how the region will subscribe to other distributed cache instances of the region- Since:
- GemFire 5.0
-
setIndexMaintenanceSynchronous
public void setIndexMaintenanceSynchronous(boolean synchronous)
Deprecated.Set how indexes on the region should be maintained. It will be either synchronous or asynchronous. Default is true.- Parameters:
synchronous- boolean specifying if index maintenance on the region should be synchronous (true) or asynchronous (false)
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean statisticsEnabled)
Deprecated.Sets whether statistics are enabled for this region and its entries. Default is false.- Parameters:
statisticsEnabled- whether statistics are enabled
-
setIgnoreJTA
public void setIgnoreJTA(boolean flag)
Deprecated.Sets the flag telling a region to ignore JTA transactions. Default is false.- Parameters:
flag- boolean specifying if the region should ignore JTA transactions- Since:
- GemFire 5.0
-
setLockGrantor
public void setLockGrantor(boolean isLockGrantor)
Deprecated.Sets whether this region should become lock grantor. Default value is false.- Parameters:
isLockGrantor- whether this region should become lock grantor
-
setMulticastEnabled
public void setMulticastEnabled(boolean value)
Deprecated.Sets whether distributed operations on this region should attempt to use multicast. Multicast must also be enabled in the cache's DistributedSystem (see "mcast-port"). Default is false.- Parameters:
value- boolean specifying if distributed operations on this region should attempt to use multicast- Since:
- GemFire 5.0
- See Also:
RegionAttributes.getMulticastEnabled()
-
setCloningEnabled
public void setCloningEnabled(boolean cloningEnable)
Deprecated.Sets cloning on region. Default is false. Note: off-heap regions always behave as if cloning is enabled.- Parameters:
cloningEnable- boolean specifying if cloning is enabled on the region- Since:
- GemFire 6.1
- See Also:
RegionAttributes.getCloningEnabled()
-
setPoolName
public void setPoolName(java.lang.String name)
Deprecated.Sets the pool name attribute. This causes regions that use these attributes to be a client region which communicates with the servers that the connection pool communicates with.If this attribute is set to
nullor""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.- Parameters:
name- the name of the connection pool to use; ifnullor""then the connection pool is disabled for regions using these attributes.- Since:
- GemFire 5.7
-
setCompressor
public void setCompressor(Compressor compressor)
Deprecated.Sets this region's compressor for compressing entry values.- Parameters:
compressor- a compressor.- Since:
- GemFire 8.0
-
setOffHeap
public void setOffHeap(boolean offHeap)
Deprecated.Enables this region's usage of off-heap memory if true.- Parameters:
offHeap- boolean flag to enable off-heap memory- Since:
- Geode 1.0
-
createRegionAttributes
@Deprecated public RegionAttributes<K,V> createRegionAttributes()
Deprecated.as of GemFire 5.0, usecreate()insteadCreates aRegionAttributeswith the current settings.- Returns:
- the newly created
RegionAttributes - Throws:
java.lang.IllegalStateException- if the current settings violate the compatibility rules
-
create
public RegionAttributes<K,V> create()
Deprecated.Creates aRegionAttributeswith the current settings.- Returns:
- the newly created
RegionAttributes - Throws:
java.lang.IllegalStateException- if the current settings violate the compatibility rules- Since:
- GemFire 5.0
-
validateAttributes
public static void validateAttributes(RegionAttributes<?,?> attrs)
Deprecated.Validates that the attributes are consistent with each other. The following rules are checked and enforced:- If the data policy
uses replicationand the scope isdistributedthen the following are incompatible:- ExpirationAction.LOCAL_INVALIDATE on the region
- ExpirationAction.LOCAL_DESTROY on the entries
- ExpirationAction.LOCAL_INVALIDATE on the entries
- An LRU with local destroy eviction action
- Region or entry expiration is incompatible with disabled statistics on the region
- Entry expiration is incompatible with the
DataPolicy.EMPTYdata policy Evictionis incompatible with theDataPolicy.EMPTYdata policy
- Parameters:
attrs- the attributes to validate- Throws:
java.lang.IllegalStateException- if the attributes are not consistent with each other.- Since:
- GemFire 3.5
- If the data policy
-
-