Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::RegionAttributes Class Reference

Defines attributes for configuring a region. More...

Inherits gemfire::Serializable.

Public Member Functions

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

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. More...
 
static SerializablecreateDeserializable ()
 Return an empty instance for deserialization. More...
 
static void registerPdxSerializer (PdxSerializerPtr pdxSerializer)
 Register the PDX serializer which can handle serialization for instances of user domain classes. More...
 
static void registerPdxType (TypeFactoryMethodPdx creationFunction)
 register an Pdx instance factory method for a given type. More...
 
static void registerType (TypeFactoryMethod creationFunction)
 register an instance factory method for a given type. More...
 

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

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)
inlinestaticinherited

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.

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

Return an empty instance for deserialization.

virtual int8_t gemfire::Serializable::DSFID ( ) const
virtualinherited

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::Struct, and gemfire::CacheableUndefined.

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 ( ) const

Returns the name of the pool attached to the region.

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
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
inlinevirtual

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 ( )
inlineinherited
Returns
the reference count
static void gemfire::Serializable::registerPdxSerializer ( PdxSerializerPtr  pdxSerializer)
staticinherited

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

See also
PdxSerializer
static void gemfire::Serializable::registerPdxType ( TypeFactoryMethodPdx  creationFunction)
staticinherited

register an Pdx instance factory method for a given type.

Exceptions
IllegalStateExceptionif 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)
staticinherited

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
IllegalStateExceptionif 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
virtualinherited

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::PdxInstance, gemfire::CacheableString, gemfire::CacheableDate, gemfire::CacheableKeyType< TObj, TYPEID, TYPENAME, SPRINTFSYM, STRSIZE >, and gemfire::CacheableEnum.

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