org.apache.geode.cache

## Class AttributesFactory<K,V>

- java.lang.Object
- - org.apache.geode.cache.AttributesFactory<K,V>

- Deprecated.
  as of 6.5 use `Cache.createRegionFactory(RegionShortcut)` or `ClientCache.createClientRegionFactory(ClientRegionShortcut)` instead.

      @Deprecated
      public class AttributesFactory<K,V>
      extends java.lang.Object

  Creates instances of `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.

  ### 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_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`]
    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-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()`
  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. If `non-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 `Delta`s If `false`, value will not be cloned `setCloningEnabled(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.
  `EvictionAttributes`
    `EvictionAttributes` 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 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 `valueConstraint` is 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.
    `HashMap` `setInitialCapacity(int)` `RegionAttributes.getInitialCapacity()`
  LoadFactor [default: `0.75`]
    The load factor of the map used for storing the entries.
    `HashMap` `setLoadFactor(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 `null` then this region will write its data to the named `DiskStore`.
    `setDiskStoreName(java.lang.String)` `RegionAttributes.getDiskStoreName()`
  DiskSynchronous [default: `true`]
    If `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.
    If `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()`
  PersistBackup [default: `false`]
    Whether or not a persistent backup should be made of the region.
    `setPersistBackup(boolean)` `RegionAttributes.getPersistBackup()`
    Deprecated, use `DataPolicy.PERSISTENT_REPLICATE` or `DataPolicy.PERSISTENT_PARTITION` instead.
  DiskWriteAttributes [default: Asynchronously write to disk every second (a `timeInterval` of 1000 and a `byteThreshold` of 0). `rollOplogs` is set to true and `maxOplogSize` is 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.
    `DiskWriteAttributes` `setDiskWriteAttributes(org.apache.geode.cache.DiskWriteAttributes)` `RegionAttributes.getDiskWriteAttributes()`
    Deprecated, use `setDiskStoreName(java.lang.String)` and `setDiskSynchronous(boolean)` instead.
  DiskDirs [default: Current working directory (`user.dir` system 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.
    `setDiskDirs(java.io.File[])` `RegionAttributes.getDiskDirs()`
    Deprecated, use `setDiskStoreName(java.lang.String)` instead.
  DiskDirSizes [default: 10240 MB]
    The size of the directory to which region's data is written.
    `setDiskDirsAndSizes(java.io.File[], int[])` `RegionAttributes.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 when `create()`} is called then an `IllegalStateException` is thrown. See `validateAttributes(org.apache.geode.cache.RegionAttributes<?, ?>)`.

  ### Creation Constraints

  #### Region Creation Constraints on RegionAttributes

  If any of the following rules are violated when `createSubregion` or `createRegion` are called, then an `IllegalStateException` is thrown.
  - A region with `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`.
  Since:
    GemFire 3.0
  See Also:
    `RegionAttributes`, `AttributesMutator`, `Region.createSubregion(String, RegionAttributes)`

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    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`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAsyncEventQueueId(java.lang.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(java.lang.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(java.io.File[] diskDirs)` Deprecated. as of 6.5 use `DiskStoreFactory.setDiskDirs(java.io.File[])` instead
    `void` | `setDiskDirsAndSizes(java.io.File[] diskDirs, int[] diskSizes)` Deprecated. as of 6.5 use `DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[])` instead
    `void` | `setDiskStoreName(java.lang.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(java.lang.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(java.lang.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(java.lang.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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_DISK_SYNCHRONOUS

          public static final boolean DEFAULT_DISK_SYNCHRONOUS

      Deprecated.
      The default disk synchronous write setting

      Current value: `true` each.

      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 a `RegionAttributes` with default settings.

    - #### AttributesFactory

          public 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`.
      Parameters:
        `regionAttributes` - the `RegionAttributes` used to initialize this AttributesFactory

  - ### Method Detail

    - #### setCacheLoader

          public void setCacheLoader(CacheLoader<K,V> cacheLoader)

      Deprecated.
      Sets the cache loader for the next `RegionAttributes` created.
      Parameters:
        `cacheLoader` - the cache loader or null if no loader
      Throws:
        `java.lang.IllegalStateException` - if this region has a `pool name set`

    - #### setCacheWriter

          public void setCacheWriter(CacheWriter<K,V> cacheWriter)

      Deprecated.
      Sets the cache writer for the next `RegionAttributes` created.
      Parameters:
        `cacheWriter` - the cache writer or null if no cache writer
      Throws:
        `java.lang.IllegalStateException` - if this region has a `pool name set`

    - #### setCacheListener

          @Deprecated
          public void setCacheListener(CacheListener<K,V> aListener)

      Deprecated. as of GemFire 5.0, use `addCacheListener(org.apache.geode.cache.CacheListener<K, V>)` instead.
      Sets the CacheListener for the next `RegionAttributes` created. 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` - if `aListener` is 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 the `newListeners` array 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 next `RegionAttributes` created. 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 next `RegionAttributes` created.
      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 next `RegionAttributes` created. 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

    - #### setCustomEntryTimeToLive

          public void setCustomEntryTimeToLive(CustomExpiry<K,V> custom)

      Deprecated.
      Sets the custom timeToLive for the next `RegionAttributes` created.
      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 next `RegionAttributes` created. 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 next `RegionAttributes` created. 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 next `RegionAttributes` created. 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 next `RegionAttributes` created. Use one of the creation methods on `EvictionAttributes` e.g. `EvictionAttributes.createLRUHeapAttributes()` to create the desired instance for this `AttributesFactory`
      Parameters:
        `evictAttrs` - Explains how and when eviction occurs in the Region.

    - #### setMirrorType

          @Deprecated
          public void setMirrorType(MirrorType mirrorType)

      Deprecated. use `setDataPolicy(org.apache.geode.cache.DataPolicy)` instead.
      Sets the mirror type for the next `RegionAttributes` created.
      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 next `RegionAttributes` created. 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 next `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.
      Parameters:
        `keyConstraint` - The Class to constrain the keys to, or null if no constraint
      Throws:
        `java.lang.IllegalArgumentException` - if `keyConstraint` is a class denoting a primitive type

    - #### setValueConstraint

          public void setValueConstraint(java.lang.Class<V> valueConstraint)

      Deprecated.
      Sets the value constraint for the next `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.
      Parameters:
        `valueConstraint` - The Class to constrain the values to, or null if no constraint
      Throws:
        `java.lang.IllegalArgumentException` - if `valueConstraint` is a class denoting a primitive type

    - #### setInitialCapacity

          public void setInitialCapacity(int initialCapacity)

      Deprecated.
      Sets the entry initial capacity for the next `RegionAttributes` created. 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 next `RegionAttributes` created. 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 next `RegionAttributes` created. 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, use `DataPolicy.PERSISTENT_REPLICATE` instead
      Sets whether or not 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.
      Since:
        GemFire 4.1

    - #### setPublisher

          @Deprecated
          public void setPublisher(boolean v)

      Deprecated. as of 6.5
      Sets whether or not 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.
      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.
      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
      Throws:
        `java.lang.IllegalArgumentException` - if `gatewaySender` is 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
      Throws:
        `java.lang.IllegalArgumentException` - if `gatewaySender` is null
      Since:
        GemFire 7.0

    - #### setEnableBridgeConflation

          @Deprecated
          public void setEnableBridgeConflation(boolean enableBridgeConflation)

      Deprecated. as of 5.7 use `setEnableSubscriptionConflation(boolean)` instead.
      Sets whether or not 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, use `setEnableSubscriptionConflation(boolean)`
      Sets whether or not 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 use `setDiskStoreName(java.lang.String)` instead
      Returns whether or not disk writes are asynchronous.
      Since:
        GemFire 3.2
      See Also:
        `Region.writeToDisk()`

    - #### setDiskDirs

          @Deprecated
          public void setDiskDirs(java.io.File[] diskDirs)

      Deprecated. as of 6.5 use `DiskStoreFactory.setDiskDirs(java.io.File[])` instead
      Sets the directories with the default size of 10240 MB 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 the `DiskStore`.
      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 use `DiskStoreFactory.setDiskDirsAndSizes(java.io.File[], int[])` instead
      Sets the directories to which the region's data is written and also set their sizes in megabytes
      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 length is not a valid positive number
      Since:
        GemFire 5.1

    - #### setPartitionAttributes

          public void setPartitionAttributes(PartitionAttributes partition)

      Deprecated.
      Sets the `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.
      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 removed
      Sets the `MembershipAttributes` that describe the membership roles required for reliable access to the region.

    - #### setSubscriptionAttributes

          public void setSubscriptionAttributes(SubscriptionAttributes subscription)

      Deprecated.
      Sets the `SubscriptionAttributes` that 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.

    - #### 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.
      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.
      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.
      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 `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.

      Parameters:
        `name` - the name of the connection pool to use; if `null` or `""` 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, use `create()` instead
      Creates a `RegionAttributes` with 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 a `RegionAttributes` with 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 replication` and the scope is `distributed` then the following are incompatible:
        - ExpirationAction.LOCAL_INVALIDATE on the regionExpirationAction.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.EMPTY` data policy
      - `Eviction` is incompatible with the `DataPolicy.EMPTY` data policy
      Parameters:
        `attrs` - the attributes to validate
      Throws:
        `java.lang.IllegalStateException` - if the attributes are not consistent with each other.
      Since:
        GemFire 3.5