GemFire 5.7.1

com.gemstone.gemfire.cache
Interface RegionAttributes


public interface RegionAttributes

Defines attributes for configuring a region. These are EvictionAttributes, CacheListener, CacheLoader, CacheWriter, scope, data policy, and expiration attributes for the region itself, expiration attributes for the region entries, and whether statistics are enabled for the region and its entries. To create an instance of this interface use AttributesFactory.createRegionAttributes(). For compatibility rules and default values, see AttributesFactory.

Note that the RegionAttributes are not distributed with the region.

Since:
2.0
See Also:
AttributesFactory, AttributesMutator, Region.getAttributes(), EvictionAttributes

Method Summary
 CacheListener getCacheListener()
          Deprecated. as of GemFire 5.0, use getCacheListeners() instead
 CacheListener[] getCacheListeners()
          Returns an array of all the cache listeners on this attributes.
 CacheLoader getCacheLoader()
          Returns the cache loader associated with this region.
 CacheWriter getCacheWriter()
          Returns the cache writer associated with this region.
 int getConcurrencyLevel()
          Returns the concurrencyLevel of the entries map.
 CustomExpiry getCustomEntryIdleTimeout()
          Gets the idleTimeout CustomExpiry, if any for entries in this region
 CustomExpiry getCustomEntryTimeToLive()
          Gets the entryTimeToLive CustomExpiry, if any for entries in this region
 DataPolicy getDataPolicy()
          Returns the data policy for this region.
 File[] getDiskDirs()
          Returns the directories to which the region's data are written.
 int[] getDiskDirSizes()
          Returns the sizes of the disk directories in megabytes
 DiskWriteAttributes getDiskWriteAttributes()
          Returns the DiskWriteAttributes that configure how the region is written to disk.
 boolean getEarlyAck()
          Returns whether or not acks are sent after an update is processed.
 boolean getEnableAsyncConflation()
          Returns whether or not async conflation is enabled for sending messages to async peers.
 boolean getEnableBridgeConflation()
          Deprecated. as of GemFire 5.0, use getEnableSubscriptionConflation() instead
 boolean getEnableConflation()
          Deprecated. as of GemFire 5.0, use getEnableSubscriptionConflation() instead #
 boolean getEnableGateway()
          Returns whether or not a Gateway is enabled.
 boolean getEnableSubscriptionConflation()
          Returns whether or not conflation is enabled for sending messages from a cache server to its clients.
 boolean getEnableWAN()
          Deprecated. as of GemFire 5.0, use getEnableGateway instead
 ExpirationAttributes getEntryIdleTimeout()
          Gets the idleTimeout expiration attributes for entries in this region.
 ExpirationAttributes getEntryTimeToLive()
          Gets the timeToLive expiration attributes for entries in this region.
 EvictionAttributes getEvictionAttributes()
          Attributes that control the size of the Region using an EvictionAlgorithm and a EvictionAction.
 String getGatewayHubId()
          Returns the id of the GatewayHub to which events are distributed.
 boolean getIgnoreJTA()
          Gets the flag telling a region to ignore JTA transactions
 boolean getIndexMaintenanceSynchronous()
          Returns whether query service index maintenance should be done synchronously.
 int getInitialCapacity()
          Returns the initial capacity of the entries map.
 Class getKeyConstraint()
          Returns the class that the keys in this region are constrained to.
 float getLoadFactor()
          Returns the load factor of the entries map.
 MembershipAttributes getMembershipAttributes()
          Returns the MembershipAttributes that configure required roles for reliable access to the region.
 MirrorType getMirrorType()
          Deprecated. as of GemFire 5.0, use getDataPolicy() instead.
 boolean getMulticastEnabled()
          Returns true if multicast communications are enabled for this region.
 PartitionAttributes getPartitionAttributes()
          Returns the PartitionAttributes that configure how the region is partitioned.
 boolean getPersistBackup()
          Deprecated. as of GemFire 5.0, use DataPolicy.PERSISTENT_REPLICATE instead
 String getPoolName()
          Returns the name of the Pool that this region will use to communicate with servers, if any.
 boolean getPublisher()
          Returns whether or not this region is a publisher.
 ExpirationAttributes getRegionIdleTimeout()
          Gets the idleTimeout expiration attributes for the region as a whole.
 ExpirationAttributes getRegionTimeToLive()
          Gets the timeToLive expiration attributes for the region as a whole.
 Scope getScope()
          Returns the scope of the region.
 boolean getStatisticsEnabled()
          Returns whether the statistics are enabled for this region and its entries.
 SubscriptionAttributes getSubscriptionAttributes()
          Returns the SubscriptionAttributes that configure how this region behaves as a subscriber to remote caches.
 Class getValueConstraint()
          Returns the class that the values in this region are constrained to.
 boolean isLockGrantor()
          Returns true if this member is configured to be lock grantor for the region.
 

Method Detail

getCacheLoader

CacheLoader getCacheLoader()
Returns the cache loader associated with this region.

Returns:
the cache loader

getCacheWriter

CacheWriter getCacheWriter()
Returns the cache writer associated with this region.

Returns:
the cache writer

getKeyConstraint

Class getKeyConstraint()
Returns the class that the keys in this region are constrained to.

Returns:
the Class the keys must be an instanceof

getValueConstraint

Class getValueConstraint()
Returns the class that the values in this region are constrained to.

Returns:
the Class the values must be an instanceof

getRegionTimeToLive

ExpirationAttributes getRegionTimeToLive()
Gets the timeToLive expiration attributes for the region as a whole.

Returns:
the timeToLive expiration attributes for this region

getRegionIdleTimeout

ExpirationAttributes getRegionIdleTimeout()
Gets the idleTimeout expiration attributes for the region as a whole.

Returns:
the IdleTimeout expiration attributes for this region

getEntryTimeToLive

ExpirationAttributes getEntryTimeToLive()
Gets the timeToLive expiration attributes for entries in this region.

Returns:
the timeToLive expiration attributes for entries in this region

getEntryIdleTimeout

ExpirationAttributes getEntryIdleTimeout()
Gets the idleTimeout expiration attributes for entries in this region.

Returns:
the idleTimeout expiration attributes for entries in this region

getCustomEntryTimeToLive

CustomExpiry getCustomEntryTimeToLive()
Gets the entryTimeToLive CustomExpiry, if any for entries in this region

Returns:
the entryTimeToLive CustomExpiry for entries in this region

getCustomEntryIdleTimeout

CustomExpiry getCustomEntryIdleTimeout()
Gets the idleTimeout CustomExpiry, if any for entries in this region

Returns:
the idleTimeout CustomExpiry for entries in this region

getIgnoreJTA

boolean getIgnoreJTA()
Gets the flag telling a region to ignore JTA transactions

Since:
5.0

getMirrorType

MirrorType getMirrorType()
Deprecated. as of GemFire 5.0, use getDataPolicy() instead.

Returns the type of mirroring for this region.

Returns:
the region's MirrorType

getDataPolicy

DataPolicy getDataPolicy()
Returns the data policy for this region.

Returns:
the region's DataPolicy
Since:
5.0

getScope

Scope getScope()
Returns the scope of the region.

Returns:
the region's Scope

getEvictionAttributes

EvictionAttributes getEvictionAttributes()
Attributes that control the size of the Region using an EvictionAlgorithm and a EvictionAction.

Returns:
the region's EvictionAttributes

getCacheListener

CacheListener getCacheListener()
Deprecated. as of GemFire 5.0, use getCacheListeners() instead

Returns the cache listener for the region.

Returns:
the region's CacheListener
Throws:
IllegalStateException - if more than one cache listener exists on this attributes

getCacheListeners

CacheListener[] getCacheListeners()
Returns an array of all the cache listeners on this attributes. Modifications to the returned array will not effect the attributes.

Returns:
the region's CacheListeners; an empty array if no listeners
Since:
5.0

getInitialCapacity

int getInitialCapacity()
Returns the initial capacity of the entries map.

Returns:
the initial capacity of the entries map
See Also:
HashMap

getLoadFactor

float getLoadFactor()
Returns the load factor of the entries map.

Returns:
the load factor of the entries map
See Also:
HashMap

isLockGrantor

boolean isLockGrantor()
Returns true if this member is configured to be lock grantor for the region. Result will always be false if the scope is not Scope.GLOBAL.

This attribute does not indicate whether or not this member is currently lock grantor. It only indicates that at the time of region creation, this member should attempt to become lock grantor.

Returns:
true if this member is configured to be lock grantor for the region
See Also:
AttributesFactory, Region.becomeLockGrantor()

getMulticastEnabled

boolean getMulticastEnabled()
Returns true if multicast communications are enabled for this region. Multicast must also be enabled in the DistributedSystem.

Returns:
true if this region is configured to allow use of multicast for distributed messaging
Since:
5.0
See Also:
AttributesFactory.setMulticastEnabled(boolean)

getConcurrencyLevel

int getConcurrencyLevel()
Returns the concurrencyLevel of the entries map.

Returns:
the concurrencyLevel
See Also:
AttributesFactory

getPersistBackup

boolean getPersistBackup()
Deprecated. as of GemFire 5.0, use DataPolicy.PERSISTENT_REPLICATE instead

Returns whether or not a persistent backup should be made of the region (as opposed to just writing the overflow data to disk).

Since:
3.2

getDiskWriteAttributes

DiskWriteAttributes getDiskWriteAttributes()
Returns the DiskWriteAttributes that configure how the region is written to disk.

Since:
3.2

getDiskDirs

File[] getDiskDirs()
Returns the directories to which the region's data are written. If multiple directories are used, GemFire will attempt to distribute the data evenly amongst them.

Since:
3.2

getIndexMaintenanceSynchronous

boolean getIndexMaintenanceSynchronous()
Returns whether query service index maintenance should be done synchronously. If false, then index maintenance is done asynchronously. The default is false.

Since:
4.0

getPartitionAttributes

PartitionAttributes getPartitionAttributes()
Returns the PartitionAttributes that configure how the region is partitioned.

Since:
5.0

getMembershipAttributes

MembershipAttributes getMembershipAttributes()
Returns the MembershipAttributes that configure required roles for reliable access to the region.

Since:
5.0

getSubscriptionAttributes

SubscriptionAttributes getSubscriptionAttributes()
Returns the SubscriptionAttributes that configure how this region behaves as a subscriber to remote caches.

Since:
5.0

getStatisticsEnabled

boolean getStatisticsEnabled()
Returns whether the statistics are enabled for this region and its entries.

Returns:
true if statistics are enabled

getEarlyAck

boolean getEarlyAck()
Returns whether or not acks are sent after an update is processed.

Returns:
True if acks are sent after updates are processed; false if acks are sent before updates are processed.
Since:
4.1

getEnableWAN

boolean getEnableWAN()
Deprecated. as of GemFire 5.0, use getEnableGateway instead

Returns whether or not a Gateway is enabled. #

Returns:
True if a Gateway is enabled; false if no Gateway is enabled (default).
Since:
4.2

getEnableGateway

boolean getEnableGateway()
Returns whether or not a Gateway is enabled.

Returns:
True if a Gateway is enabled; false if no Gateway is enabled (default).
Since:
5.0

getGatewayHubId

String getGatewayHubId()
Returns the id of the GatewayHub to which events are distributed.

Returns:
the id of the GatewayHub to which events are distributed
Since:
5.1
Note: Early Access. Please consult GemStone technical support for assistance with this functionality.

getPublisher

boolean getPublisher()
Returns whether or not this region is a publisher. Publishers are regions on which distributed write operations are done.

Returns:
True if a publisher; false if not (default).
Since:
4.2.3

getEnableConflation

boolean getEnableConflation()
Deprecated. as of GemFire 5.0, use getEnableSubscriptionConflation() instead #

Returns 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.

Returns:
True if conflation is enabled; false conflation is not enabled (default).
Since:
4.2

getEnableBridgeConflation

boolean getEnableBridgeConflation()
Deprecated. as of GemFire 5.0, use getEnableSubscriptionConflation() instead

Returns 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.

Returns:
True if conflation is enabled; false conflation is not enabled (default).
Since:
5.0

getEnableSubscriptionConflation

boolean getEnableSubscriptionConflation()
Returns 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.

Returns:
True if conflation is enabled; false conflation is not enabled (default).
Since:
5.7

getEnableAsyncConflation

boolean getEnableAsyncConflation()
Returns whether or not async conflation is enabled for sending messages to async peers.

Returns:
True if async conflation is enabled; false async conflation is not enabled (default).
Since:
4.2.3

getDiskDirSizes

int[] getDiskDirSizes()
Returns the sizes of the disk directories in megabytes

Returns:
int[] sizes of the disk directories

getPoolName

String getPoolName()
Returns the name of the Pool that this region will use to communicate with servers, if any. Returns null if this region communicates with peers.

Returns:
the name of the client-server Pool this region will use for server communication; null is returned if the region communicates with peers.
Since:
5.7

GemFire 5.7.1

Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.