RegionConfiguration (Apache Geode 1.3.0)
Date: 2017-10-26

org.apache.geode.modules.util

## Class RegionConfiguration

- java.lang.Object
- - org.apache.geode.modules.util.RegionConfiguration

- All Implemented Interfaces:
    java.io.Serializable, DataSerializable

      public class RegionConfiguration
      extends java.lang.Object
      implements DataSerializable

  Class `RegionConfiguration` encapsulates the configuration attributes for a `Region` to be created on the server.
  Since:
    GemFire 6.5
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable

      `DataSerializable.Replaceable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_MAX_INACTIVE_INTERVAL` The default max inactive interval.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegionConfiguration()` Default constructor used by the `DataSerialiable` interface

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fromData(java.io.DataInput in)` Reads the state of this object as primitive data from the given `DataInput`.
    `java.lang.String` | `getCacheWriterName()`
    `CustomExpiry` | `getCustomExpiry()` Returns the `CustomExpiry` to be used
    `boolean` | `getEnableDebugListener()` Returns whether a debug `CacheListener` is enabled.
    `boolean` | `getEnableGatewayDeltaReplication()` Returns whether delta replication across a `Gateway` is enabled.
    `boolean` | `getEnableGatewayReplication()` Returns whether replication across a `Gateway` is enabled.
    `int` | `getMaxInactiveInterval()` Returns the maximum time interval in seconds entries are expired
    `java.lang.String` | `getRegionAttributesId()` Returns the id of the `RegionAttributes` to be used
    `java.lang.String` | `getRegionName()` Returns the name of the `Region` to be created
    `boolean` | `getSessionExpirationCacheListener()`
    `static void` | `registerInstantiator(int id)` Registers an `Instantiator` for the `SessionConfiguration` class
    `void` | `setCacheWriterName(java.lang.String cacheWriterName)` set the fully qualified name of the `CacheWriter` to be created on the server.
    `void` | `setCustomExpiry(CustomExpiry customExpiry)` Sets the `CustomExpiry` to be used
    `void` | `setEnableDebugListener(boolean enableDebugListener)` Enables/disables a debug `CacheListener`.
    `void` | `setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)` Enables/disables delta replication across a `Gateway`.
    `void` | `setEnableGatewayReplication(boolean enableGatewayReplication)` Enables/disables replication across a `Gateway`.
    `void` | `setMaxInactiveInterval(int maxInactiveInterval)` Sets the maximum time interval in seconds before entries are expired
    `void` | `setRegionAttributesId(java.lang.String regionAttributesId)` Sets the id of the `RegionAttributes` to be used
    `void` | `setRegionName(java.lang.String regionName)` Sets the name of the `Region` to be created
    `void` | `setSessionExpirationCacheListener(boolean enableSessionExpirationCacheListener)`
    `void` | `toData(java.io.DataOutput out)` Writes the state of this object as primitive data to the given `DataOutput`.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### DEFAULT_MAX_INACTIVE_INTERVAL

          public static final int DEFAULT_MAX_INACTIVE_INTERVAL

      The default max inactive interval. The default value is -1.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RegionConfiguration

          public RegionConfiguration()

      Default constructor used by the `DataSerialiable` interface

  - ### Method Detail

    - #### setRegionName

          public void setRegionName(java.lang.String regionName)

      Sets the name of the `Region` to be created
      Parameters:
        `regionName` - The name of the `Region` to be created

    - #### getRegionName

          public java.lang.String getRegionName()

      Returns the name of the `Region` to be created
      Returns:
        the name of the `Region` to be created

    - #### setRegionAttributesId

          public void setRegionAttributesId(java.lang.String regionAttributesId)

      Sets the id of the `RegionAttributes` to be used
      Parameters:
        `regionAttributesId` - The id of the `RegionAttributes` to be used

    - #### getRegionAttributesId

          public java.lang.String getRegionAttributesId()

      Returns the id of the `RegionAttributes` to be used
      Returns:
        the id of the `RegionAttributes` to be used

    - #### setMaxInactiveInterval

          public void setMaxInactiveInterval(int maxInactiveInterval)

      Sets the maximum time interval in seconds before entries are expired
      Parameters:
        `maxInactiveInterval` - The maximum time interval in seconds before entries are expired

    - #### getMaxInactiveInterval

          public int getMaxInactiveInterval()

      Returns the maximum time interval in seconds entries are expired
      Returns:
        the maximum time interval in seconds before entries are expired

    - #### setCustomExpiry

          public void setCustomExpiry(CustomExpiry customExpiry)

      Sets the `CustomExpiry` to be used
      Parameters:
        `customExpiry` - The `CustomExpiry` to be used

    - #### getCustomExpiry

          public CustomExpiry getCustomExpiry()

      Returns the `CustomExpiry` to be used
      Returns:
        the `CustomExpiry` to be used

    - #### setEnableGatewayDeltaReplication

          public void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)

      Enables/disables delta replication across a `Gateway`.
      Parameters:
        `enableGatewayDeltaReplication` - true to enable, false to disable gateway delta replication.

    - #### getEnableGatewayDeltaReplication

          public boolean getEnableGatewayDeltaReplication()

      Returns whether delta replication across a `Gateway` is enabled.
      Returns:
        whether delta replication across a `Gateway` is enabled

    - #### setEnableGatewayReplication

          public void setEnableGatewayReplication(boolean enableGatewayReplication)

      Enables/disables replication across a `Gateway`.
      Parameters:
        `enableGatewayReplication` - true to enable, false to disable gateway replication.

    - #### getEnableGatewayReplication

          public boolean getEnableGatewayReplication()

      Returns whether replication across a `Gateway` is enabled.
      Returns:
        whether replication across a `Gateway` is enabled

    - #### setEnableDebugListener

          public void setEnableDebugListener(boolean enableDebugListener)

      Enables/disables a debug `CacheListener`.
      Parameters:
        `enableDebugListener` - true to enable, false to disable debug `CacheListener`.

    - #### getEnableDebugListener

          public boolean getEnableDebugListener()

      Returns whether a debug `CacheListener` is enabled.
      Returns:
        whether a debug `CacheListener` is enabled

    - #### setSessionExpirationCacheListener

          public void setSessionExpirationCacheListener(boolean enableSessionExpirationCacheListener)

    - #### getSessionExpirationCacheListener

          public boolean getSessionExpirationCacheListener()

    - #### toData

          public void toData(java.io.DataOutput out)
                      throws java.io.IOException

      Description copied from interface: `DataSerializable`
      Writes the state of this object as primitive data to the given `DataOutput`.

      Since 5.7 it is possible for any method call to the specified `DataOutput` to throw `GemFireRethrowable`. It should not be caught by user code. If it is it must be rethrown.

      Specified by:
        `toData` in interface `DataSerializable`
      Throws:
        `java.io.IOException` - A problem occurs while writing to `out`

    - #### fromData

          public void fromData(java.io.DataInput in)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException

      Description copied from interface: `DataSerializable`
      Reads the state of this object as primitive data from the given `DataInput`.
      Specified by:
        `fromData` in interface `DataSerializable`
      Throws:
        `java.io.IOException` - A problem occurs while reading from `in`
        `java.lang.ClassNotFoundException` - A class could not be loaded while reading from `in`

    - #### registerInstantiator

          public static void registerInstantiator(int id)

      Registers an `Instantiator` for the `SessionConfiguration` class

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setCacheWriterName

          public void setCacheWriterName(java.lang.String cacheWriterName)

      set the fully qualified name of the `CacheWriter` to be created on the server. The cacheWriter must have a zero arg constructor, and must be present on the classpath on the server.
      Parameters:
        `cacheWriterName` - fully qualified class name of the cacheWriter

    - #### getCacheWriterName

          public java.lang.String getCacheWriterName()