public class RegionConfiguration extends Object implements DataSerializable
RegionConfiguration
encapsulates the configuration attributes for a
Region
to be created on the server.DataSerializable.Replaceable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_INACTIVE_INTERVAL
The default max inactive interval.
|
Constructor and Description |
---|
RegionConfiguration()
Default constructor used by the
DataSerialiable interface |
Modifier and Type | Method and Description |
---|---|
void |
fromData(DataInput in)
Reads the state of this object as primitive data from the given
DataInput . |
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
|
String |
getRegionAttributesId()
Returns the id of the
RegionAttributes to be used |
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(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(String regionAttributesId)
Sets the id of the
RegionAttributes to be used |
void |
setRegionName(String regionName)
Sets the name of the
Region to be created |
void |
setSessionExpirationCacheListener(boolean enableSessionExpirationCacheListener) |
void |
toData(DataOutput out)
Writes the state of this object as primitive data to the given
DataOutput . |
String |
toString() |
public static final int DEFAULT_MAX_INACTIVE_INTERVAL
public RegionConfiguration()
DataSerialiable
interfacepublic void setRegionName(String regionName)
Region
to be createdregionName
- The name of the Region
to be createdpublic String getRegionName()
Region
to be createdRegion
to be createdpublic void setRegionAttributesId(String regionAttributesId)
RegionAttributes
to be usedregionAttributesId
- The id of the RegionAttributes
to be usedpublic String getRegionAttributesId()
RegionAttributes
to be usedRegionAttributes
to be usedpublic void setMaxInactiveInterval(int maxInactiveInterval)
maxInactiveInterval
- The maximum time interval in seconds before entries are expiredpublic int getMaxInactiveInterval()
public void setCustomExpiry(CustomExpiry customExpiry)
CustomExpiry
to be usedcustomExpiry
- The CustomExpiry
to be usedpublic CustomExpiry getCustomExpiry()
CustomExpiry
to be usedCustomExpiry
to be usedpublic void setEnableGatewayDeltaReplication(boolean enableGatewayDeltaReplication)
Gateway
.enableGatewayDeltaReplication
- true to enable, false to disable gateway delta
replication.public boolean getEnableGatewayDeltaReplication()
Gateway
is enabled.Gateway
is enabledpublic void setEnableGatewayReplication(boolean enableGatewayReplication)
Gateway
.enableGatewayReplication
- true to enable, false to disable gateway replication.public boolean getEnableGatewayReplication()
Gateway
is enabled.Gateway
is enabledpublic void setEnableDebugListener(boolean enableDebugListener)
CacheListener
.enableDebugListener
- true to enable, false to disable debug CacheListener
.public boolean getEnableDebugListener()
CacheListener
is enabled.CacheListener
is enabledpublic void setSessionExpirationCacheListener(boolean enableSessionExpirationCacheListener)
public boolean getSessionExpirationCacheListener()
public void toData(DataOutput out) throws IOException
DataSerializable
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.
toData
in interface DataSerializable
IOException
- A problem occurs while writing to out
public void fromData(DataInput in) throws IOException, ClassNotFoundException
DataSerializable
DataInput
.fromData
in interface DataSerializable
IOException
- A problem occurs while reading from in
ClassNotFoundException
- A class could not be loaded while reading from in
public static void registerInstantiator(int id)
Instantiator
for the SessionConfiguration
classpublic void setCacheWriterName(String cacheWriterName)
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.cacheWriterName
- fully qualified class name of the cacheWriterpublic String getCacheWriterName()