gemfire::RegionAttributes Class Reference

Inherits gemfire::Serializable.


Detailed Description

Defines attributes for configuring a region.

These are CacheListener, CacheLoader, CacheWriter, scope 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.

See also:
AttributesFactory

AttributesMutator

Region::getAttributes


Public Member Functions

virtual int32_t classId () const
 Return class id for serialization.
virtual int8_t DSFID () const
virtual SerializablefromData (DataInput &in)
 Initialize members from serialized data.
CacheListenerPtr getCacheListener ()
 Gets the cache listener for the region.
const char * getCacheListenerFactory ()
 This method returns the symbol name of the factory function from which the loader will be created on a cache server.
const char * getCacheListenerLibrary ()
 This method returns the path of the library from which the factory function will be invoked on a cache server.
CacheLoaderPtr getCacheLoader ()
const char * getCacheLoaderFactory ()
 This method returns the symbol name of the factory function from which the loader will be created on a cache server.
const char * getCacheLoaderLibrary ()
 This method returns the path of the library from which the factory function will be invoked on a cache server.
CacheWriterPtr getCacheWriter ()
 Gets the cache writer for the region.
const char * getCacheWriterFactory ()
 This method returns the symbol name of the factory function from which the loader will be created on a cache server.
const char * getCacheWriterLibrary ()
 This method returns the path of the library from which the factory function will be invoked on a cache server.
bool getCachingEnabled () const
 If true, this region will store data in the current process.
bool getClientNotificationEnabled () const
 This method returns the setting of client notification.
bool getConcurrencyChecksEnabled ()
 Returns true if concurrent update checks are turned on for this region.
uint8_t getConcurrencyLevel () const
 Returns the concurrencyLevel of the entry's local cache.
DiskPolicyType::PolicyType getDiskPolicy () const
 Returns the disk policy type of the region.
const char * getEndpoints ()
 This method returns the list of servername:portno separated by comma.
int getEntryIdleTimeout ()
 Gets the idleTimeout expiration attributes for entries in this region.
int getEntryTimeToLive ()
 Gets the timeToLive expiration attributes for entries in this region.
int getInitialCapacity () const
 Returns the initial capacity of the entry's local cache.
float getLoadFactor () const
 Returns the load factor of the entry's local cache.
uint32_t getLruEntriesLimit () const
 Returns the maximum number of entries this cache will hold before using LRU eviction.
const
ExpirationAction::Action 
getLruEvictionAction () const
 Returns the ExpirationAction used for LRU Eviction, default is LOCAL_DESTROY.
PartitionResolverPtr getPartitionResolver ()
 Gets the partition resolver for the partition region.
const char * getPartitionResolverFactory ()
 This method returns the symbol name of the factory function from which the loader will be created on a cache server.
const char * getPartitionResolverLibrary ()
 This method returns the path of the library from which the factory function will be invoked on a cache server.
const char * getPersistenceFactory ()
 This method returns the symbol name of the factory function from which the persistence will be created on a cache server.
const char * getPersistenceLibrary ()
 This method returns the path of the library from which the factory function will be invoked on a cache server.
PersistenceManagerPtr getPersistenceManager ()
 Gets the persistence for the region.
PropertiesPtr getPersistenceProperties ()
 This method returns the properties pointer which is set for persistence.
const char * getPoolName ()
 TODO Returns the name of the Pool that this region will use to communicate with servers, if any.
const char * getPoolName () const
 Returns the name of the pool attached to the region.
int getRegionIdleTimeout ()
 Gets the idleTimeout expiration attributes for the region as a whole.
int getRegionTimeToLive ()
 Gets the timeToLive expiration attributes for the region as a whole.
ScopeType::Scope getScope () const
 Returns the scope of the region.
virtual uint32_t objectSize () const
bool operator!= (const RegionAttributes &other) const
 Return true if any of the attributes are not equal to those of other.
bool operator== (const RegionAttributes &other) const
 Return true if all the attributes are equal to those of other.
void preserveSB () const
 Atomically increment reference count.
int32_t refCount ()
 
Returns:
the reference count

void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
virtual void toData (DataOutput &out) const
 Serialize out to stream.
virtual
CacheableStringPtr 
toString () const
 Display this object as 'string', which depends on the implementation in the subclasses.
virtual int8_t typeId () const
 Return type id for serialization.
void validateSerializableAttributes ()
 throws IllegalStateException if the attributes are not suited for serialization such as those that have a cache callback (listener, loader, or writer) set directly instead of through the string value setters.

Static Public Member Functions

template<class PRIM>
static SerializablePtr create (const PRIM value)
 Factory method that creates the Serializable object that matches the type of value.
static SerializablecreateDeserializable ()
 Return an empty instance for deserialization.
static void registerPdxSerializer (PdxSerializerPtr pdxSerializer)
 Register the PDX serializer which can handle serialization for instances of user domain classes.
static void registerPdxType (TypeFactoryMethodPdx creationFunction)
static void registerType (TypeFactoryMethod creationFunction)

Member Function Documentation

virtual int32_t gemfire::RegionAttributes::classId (  )  const [virtual]

Return class id for serialization.

Implements gemfire::Serializable.

template<class PRIM>
static SerializablePtr gemfire::Serializable::create ( const PRIM  value  )  [inline, static, inherited]

Factory method that creates the Serializable object that matches the type of value.

For customer defined derivations of Serializable, the method gemfire::createValue may be overloaded. For pointer types (e.g. char*) the method gemfire::createValueArr may be overloaded.

Reimplemented in gemfire::CacheableKey.

static Serializable* gemfire::RegionAttributes::createDeserializable (  )  [static]

Return an empty instance for deserialization.

virtual int8_t gemfire::Serializable::DSFID (  )  const [virtual, inherited]

return the Data Serialization Fixed ID type. This is used to determine what instance type to create and deserialize into.

Note that this should not be overridden by custom implementations and is reserved only for builtin types.

Reimplemented in gemfire::CacheableUndefined, and gemfire::Struct.

virtual Serializable* gemfire::RegionAttributes::fromData ( DataInput in  )  [virtual]

Initialize members from serialized data.

Implements gemfire::Serializable.

CacheListenerPtr gemfire::RegionAttributes::getCacheListener (  ) 

Gets the cache listener for the region.

Returns:
a pointer that points to the region's , CacheListener , NULLPTR if there is no CacheListener defined for this region.

const char* gemfire::RegionAttributes::getCacheListenerFactory (  ) 

This method returns the symbol name of the factory function from which the loader will be created on a cache server.

const char* gemfire::RegionAttributes::getCacheListenerLibrary (  ) 

This method returns the path of the library from which the factory function will be invoked on a cache server.

CacheLoaderPtr gemfire::RegionAttributes::getCacheLoader (  ) 

public static methods Gets the cache loader for the region.

Returns:
a pointer that points to the region's , CacheLoader , NULLPTR if there is no CacheLoader for this region.

const char* gemfire::RegionAttributes::getCacheLoaderFactory (  ) 

This method returns the symbol name of the factory function from which the loader will be created on a cache server.

const char* gemfire::RegionAttributes::getCacheLoaderLibrary (  ) 

This method returns the path of the library from which the factory function will be invoked on a cache server.

CacheWriterPtr gemfire::RegionAttributes::getCacheWriter (  ) 

Gets the cache writer for the region.

Returns:
a pointer that points to the region's , CacheWriter , NULLPTR if there is no CacheWriter for this region

const char* gemfire::RegionAttributes::getCacheWriterFactory (  ) 

This method returns the symbol name of the factory function from which the loader will be created on a cache server.

const char* gemfire::RegionAttributes::getCacheWriterLibrary (  ) 

This method returns the path of the library from which the factory function will be invoked on a cache server.

bool gemfire::RegionAttributes::getCachingEnabled (  )  const [inline]

If true, this region will store data in the current process.

Returns:
true or false, indicating cachingEnabled state.

bool gemfire::RegionAttributes::getClientNotificationEnabled (  )  const

This method returns the setting of client notification.

bool gemfire::RegionAttributes::getConcurrencyChecksEnabled (  )  [inline]

Returns true if concurrent update checks are turned on for this region.

Returns:
true if concurrent update checks are turned on

uint8_t gemfire::RegionAttributes::getConcurrencyLevel (  )  const

Returns the concurrencyLevel of the entry's local cache.

Returns:
the concurrencyLevel
See also:
AttributesFactory

DiskPolicyType::PolicyType gemfire::RegionAttributes::getDiskPolicy (  )  const

Returns the disk policy type of the region.

Returns:
the DiskPolicyType::PolicyType, default is DiskPolicyType::NONE.

const char* gemfire::RegionAttributes::getEndpoints (  ) 

This method returns the list of servername:portno separated by comma.

int gemfire::RegionAttributes::getEntryIdleTimeout (  ) 

Gets the idleTimeout expiration attributes for entries in this region.

Returns:
the idleTimeout expiration attributes for entries in this region

int gemfire::RegionAttributes::getEntryTimeToLive (  ) 

Gets the timeToLive expiration attributes for entries in this region.

Returns:
the timeToLive expiration attributes for entries in this region

int gemfire::RegionAttributes::getInitialCapacity (  )  const

Returns the initial capacity of the entry's local cache.

Returns:
the initial capacity of the entry's local cache

float gemfire::RegionAttributes::getLoadFactor (  )  const

Returns the load factor of the entry's local cache.

Returns:
the load factor of the entry's local cache

uint32_t gemfire::RegionAttributes::getLruEntriesLimit (  )  const

Returns the maximum number of entries this cache will hold before using LRU eviction.

A return value of zero, 0, indicates no limit.

const ExpirationAction::Action gemfire::RegionAttributes::getLruEvictionAction (  )  const

Returns the ExpirationAction used for LRU Eviction, default is LOCAL_DESTROY.

PartitionResolverPtr gemfire::RegionAttributes::getPartitionResolver (  ) 

Gets the partition resolver for the partition region.

Returns:
a pointer that points to the region's , PartitionResolver , NULLPTR if there is no PartitionResolver defined for this region.

const char* gemfire::RegionAttributes::getPartitionResolverFactory (  ) 

This method returns the symbol name of the factory function from which the loader will be created on a cache server.

const char* gemfire::RegionAttributes::getPartitionResolverLibrary (  ) 

This method returns the path of the library from which the factory function will be invoked on a cache server.

const char* gemfire::RegionAttributes::getPersistenceFactory (  ) 

This method returns the symbol name of the factory function from which the persistence will be created on a cache server.

const char* gemfire::RegionAttributes::getPersistenceLibrary (  ) 

This method returns the path of the library from which the factory function will be invoked on a cache server.

PersistenceManagerPtr gemfire::RegionAttributes::getPersistenceManager (  ) 

Gets the persistence for the region.

Returns:
a pointer that points to the region's , PersistenceManager , NULLPTR if there is no PersistenceManager for this region.

PropertiesPtr gemfire::RegionAttributes::getPersistenceProperties (  ) 

This method returns the properties pointer which is set for persistence.

const char* gemfire::RegionAttributes::getPoolName (  )  [inline]

TODO Returns the name of the Pool that this region will use to communicate with servers, if any.

Returns:
the name of the client-server Pool

const char* gemfire::RegionAttributes::getPoolName (  )  const

Returns the name of the pool attached to the region.

int gemfire::RegionAttributes::getRegionIdleTimeout (  ) 

Gets the idleTimeout expiration attributes for the region as a whole.

Returns:
the IdleTimeout expiration attributes for this region

int gemfire::RegionAttributes::getRegionTimeToLive (  ) 

Gets the timeToLive expiration attributes for the region as a whole.

Returns:
the timeToLive expiration attributes for this region

ScopeType::Scope gemfire::RegionAttributes::getScope (  )  const

Returns the scope of the region.

Returns:
the region's ScopeType::Scope

virtual uint32_t gemfire::RegionAttributes::objectSize (  )  const [inline, virtual]

return the size in bytes of the instance being serialized. This is used to determine whether the cache is using up more physical memory than it has been configured to use. The method can return zero if the user does not require the ability to control cache memory utilization. Note that you must implement this only if you use the HeapLRU feature.

Reimplemented from gemfire::Serializable.

bool gemfire::RegionAttributes::operator!= ( const RegionAttributes other  )  const

Return true if any of the attributes are not equal to those of other.

bool gemfire::RegionAttributes::operator== ( const RegionAttributes other  )  const

Return true if all the attributes are equal to those of other.

void gemfire::SharedBase::preserveSB (  )  const [inherited]

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount (  )  [inline, inherited]

Returns:
the reference count

static void gemfire::Serializable::registerPdxSerializer ( PdxSerializerPtr  pdxSerializer  )  [static, inherited]

Register the PDX serializer which can handle serialization for instances of user domain classes.

See also:
PdxSerializer

static void gemfire::Serializable::registerPdxType ( TypeFactoryMethodPdx  creationFunction  )  [static, inherited]

register an Pdx instance factory method for a given type.

Exceptions:
IllegalStateException if the typeName has already been registered, or there is an error in registering the type; check errno for more information in the latter case.

static void gemfire::Serializable::registerType ( TypeFactoryMethod  creationFunction  )  [static, inherited]

register an instance factory method for a given type. During registration the factory will be invoked to extract the typeId to associate with this function.

Exceptions:
IllegalStateException if the typeId has already been registered, or there is an error in registering the type; check errno for more information in the latter case.

void gemfire::SharedBase::releaseSB (  )  const [inherited]

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

virtual void gemfire::RegionAttributes::toData ( DataOutput out  )  const [virtual]

Serialize out to stream.

Implements gemfire::Serializable.

virtual CacheableStringPtr gemfire::Serializable::toString (  )  const [virtual, inherited]

Display this object as 'string', which depends on the implementation in the subclasses.

The default implementation renders the classname.

The return value may be a temporary, so the caller has to ensure that the SharedPtr count does not go down to zero by storing the result in a variable or otherwise.

Reimplemented in gemfire::CacheableKeyType< TObj, TYPEID, TYPENAME, SPRINTFSYM, STRSIZE >, gemfire::CacheableDate, gemfire::CacheableEnum, and gemfire::CacheableString.

virtual int8_t gemfire::RegionAttributes::typeId (  )  const [virtual]

Return type id for serialization.

Reimplemented from gemfire::Serializable.

void gemfire::RegionAttributes::validateSerializableAttributes (  ) 

throws IllegalStateException if the attributes are not suited for serialization such as those that have a cache callback (listener, loader, or writer) set directly instead of through the string value setters.


GemFire C++ Cache API Documentation