VMware GemFire Native C++ Reference  9.1
apache::geode::client::AttributesMutator Class Reference

Supports modification of certain region attributes after the region has been created. More...

Inherits apache::geode::client::SharedBase.

Public Member Functions

 AttributesMutator (const RegionPtr &region)
 Internal constructor. 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...
 
void setCacheListener (const CacheListenerPtr &aListener)
 Sets cache listener for region. More...
 
void setCacheListener (const char *libpath, const char *factoryFuncName)
 Sets cache listener for region. More...
 
void setCacheLoader (const CacheLoaderPtr &aLoader)
 Sets cache loader for region. More...
 
void setCacheLoader (const char *libpath, const char *factoryFuncName)
 Sets cache loader for region. More...
 
void setCacheWriter (const CacheWriterPtr &aWriter)
 Sets cache writer for region. More...
 
void setCacheWriter (const char *libpath, const char *factoryFuncName)
 Sets cache writer for region. More...
 
int32_t setEntryIdleTimeout (int32_t idleTimeout)
 Sets the idleTimeout duration for region entries. More...
 
ExpirationAction::Action setEntryIdleTimeoutAction (ExpirationAction::Action action)
 Set the idleTimeout Action for region entries. More...
 
int32_t setEntryTimeToLive (int32_t timeToLive)
 Sets the timeToLive duration for region entries. More...
 
ExpirationAction::Action setEntryTimeToLiveAction (ExpirationAction::Action action)
 Set the timeToLive Action for region entries. More...
 
uint32_t setLruEntriesLimit (uint32_t entriesLimit)
 Sets the Maximum entry count in the region before LRU eviction. More...
 
int32_t setRegionIdleTimeout (int32_t idleTimeout)
 Sets the idleTimeout duration for the region itself. More...
 
ExpirationAction::Action setRegionIdleTimeoutAction (ExpirationAction::Action action)
 Set the idleTimeout Action for the region itself. More...
 
int32_t setRegionTimeToLive (int32_t timeToLive)
 Sets the timeToLive duration for the region itself. More...
 
ExpirationAction::Action setRegionTimeToLiveAction (ExpirationAction::Action action)
 Set the timeToLive Action for the region itself. More...
 

Detailed Description

Supports modification of certain region attributes after the region has been created.

It is required that the attributes be completely initialized using an AttributesFactory before creating the region. AttributesMutator can be applied to adjusting and tuning a subset of attributes that are modifiable at runtime.

The setter methods all return the previous value of the attribute.

See also
Region::getAttributesMutator
RegionAttributes
AttributesFactory

Constructor & Destructor Documentation

apache::geode::client::AttributesMutator::AttributesMutator ( const RegionPtr region)

Internal constructor.

Use Region::getAttributesMutator() to acquire the mutator for a region.

Member Function Documentation

void apache::geode::client::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t apache::geode::client::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void apache::geode::client::SharedBase::releaseSB ( ) const
inherited

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

void apache::geode::client::AttributesMutator::setCacheListener ( const CacheListenerPtr aListener)

Sets cache listener for region.

The previous cache listener will be replaced with aListener.

Parameters
aListenercache listener
void apache::geode::client::AttributesMutator::setCacheListener ( const char *  libpath,
const char *  factoryFuncName 
)

Sets cache listener for region.

The previous cache listener will be replaced with a listener created using the factory function provided in the given library.

Parameters
libpathpath of the library containing cache listener factory function.
factoryFuncNamefactory function for creating cache listener.
void apache::geode::client::AttributesMutator::setCacheLoader ( const CacheLoaderPtr aLoader)

Sets cache loader for region.

The previous cache loader will be replaced with aLoader.

Parameters
aLoadercache loader
void apache::geode::client::AttributesMutator::setCacheLoader ( const char *  libpath,
const char *  factoryFuncName 
)

Sets cache loader for region.

The previous cache loader will be replaced with a loader created using the factory function provided in the given library.

Parameters
libpathpath of the library containing cache loader factory function.
factoryFuncNamefactory function for creating cache loader.
void apache::geode::client::AttributesMutator::setCacheWriter ( const CacheWriterPtr aWriter)

Sets cache writer for region.

The previous cache writer will be replaced with aWriter.

Parameters
aWritercache writer
void apache::geode::client::AttributesMutator::setCacheWriter ( const char *  libpath,
const char *  factoryFuncName 
)

Sets cache writer for region.

The previous cache writer will be replaced with a writer created using the factory function provided in the given library.

Parameters
libpathpath of the library containing cache writer factory function.
factoryFuncNamefactory function for creating cache writer.
int32_t apache::geode::client::AttributesMutator::setEntryIdleTimeout ( int32_t  idleTimeout)

Sets the idleTimeout duration for region entries.

Parameters
idleTimeoutthe idleTimeout in seconds for entries in this region.
Returns
the previous value.
Exceptions
IllegalStateExceptionif the new idleTimeout changes entry expiration from disabled to enabled or enabled to disabled.
ExpirationAction::Action apache::geode::client::AttributesMutator::setEntryIdleTimeoutAction ( ExpirationAction::Action  action)

Set the idleTimeout Action for region entries.

Parameters
actionthe idleTimeout ExpirationAction::Action for entries in this region.
Returns
the previous value.
int32_t apache::geode::client::AttributesMutator::setEntryTimeToLive ( int32_t  timeToLive)

Sets the timeToLive duration for region entries.

Parameters
timeToLivethe timeToLive in seconds for entries in this region.
Returns
the previous value.
Exceptions
IllegalStateExceptionif the new timeToLive changes entry expiration from disabled to enabled or enabled to disabled.
ExpirationAction::Action apache::geode::client::AttributesMutator::setEntryTimeToLiveAction ( ExpirationAction::Action  action)

Set the timeToLive Action for region entries.

Parameters
actionthe timeToLive ExpirationAction::Action for entries in this region.
Returns
the previous value.
uint32_t apache::geode::client::AttributesMutator::setLruEntriesLimit ( uint32_t  entriesLimit)

Sets the Maximum entry count in the region before LRU eviction.

Parameters
entriesLimitthe number of entries to allow.
Returns
the previous value.
Exceptions
IllegalStateExceptionif the new entriesLimit changes LRU from disabled to enabled or enabled to disabled.
int32_t apache::geode::client::AttributesMutator::setRegionIdleTimeout ( int32_t  idleTimeout)

Sets the idleTimeout duration for the region itself.

Parameters
idleTimeoutthe ExpirationAttributes for this region idleTimeout
Returns
the previous value.
Exceptions
IllegalStateExceptionif the new idleTimeout changes region expiration from disabled to enabled or enabled to disabled.
ExpirationAction::Action apache::geode::client::AttributesMutator::setRegionIdleTimeoutAction ( ExpirationAction::Action  action)

Set the idleTimeout Action for the region itself.

Parameters
actionthe idleTimeout ExpirationAction::Action for this region.
Returns
the previous value.
int32_t apache::geode::client::AttributesMutator::setRegionTimeToLive ( int32_t  timeToLive)

Sets the timeToLive duration for the region itself.

Parameters
timeToLivethe ExpirationAttributes for this region timeToLive
Returns
the previous value.
Exceptions
IllegalStateExceptionif the new timeToLive changes region expiration from disabled to enabled or enabled to disabled.
ExpirationAction::Action apache::geode::client::AttributesMutator::setRegionTimeToLiveAction ( ExpirationAction::Action  action)

Set the timeToLive Action for the region itself.

Parameters
actionthe timeToLive ExpirationAction::Action for this region.
Returns
the previous value.

Pivotal GemFire C++ Cache API Documentation