VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
Supports modification of certain region attributes after the region has been created. More...
#include <AttributesMutator.hpp>
Public Member Functions | |
| AttributesMutator (const std::shared_ptr< Region > ®ion) | |
| Internal constructor. | |
| void | setCacheListener (const std::shared_ptr< CacheListener > &aListener) |
| Sets cache listener for region. | |
| void | setCacheListener (const std::string &libpath, const std::string &factoryFuncName) |
| Sets cache listener for region. | |
| void | setCacheLoader (const std::shared_ptr< CacheLoader > &aLoader) |
| Sets cache loader for region. | |
| void | setCacheLoader (const std::string &libpath, const std::string &factoryFuncName) |
| Sets cache loader for region. | |
| void | setCacheWriter (const std::shared_ptr< CacheWriter > &aWriter) |
| Sets cache writer for region. | |
| void | setCacheWriter (const std::string &libpath, const std::string &factoryFuncName) |
| Sets cache writer for region. | |
| std::chrono::seconds | setEntryIdleTimeout (std::chrono::seconds idleTimeout) |
| Sets the idleTimeout duration for region entries. | |
| ExpirationAction | setEntryIdleTimeoutAction (ExpirationAction action) |
| Set the idleTimeout Action for region entries. | |
| std::chrono::seconds | setEntryTimeToLive (std::chrono::seconds timeToLive) |
| Sets the timeToLive duration for region entries. | |
| ExpirationAction | setEntryTimeToLiveAction (ExpirationAction action) |
| Set the timeToLive Action for region entries. | |
| uint32_t | setLruEntriesLimit (uint32_t entriesLimit) |
| Sets the Maximum entry count in the region before LRU eviction. | |
| std::chrono::seconds | setRegionIdleTimeout (std::chrono::seconds idleTimeout) |
| Sets the idleTimeout duration for the region itself. | |
| ExpirationAction | setRegionIdleTimeoutAction (ExpirationAction action) |
| Set the idleTimeout Action for the region itself. | |
| std::chrono::seconds | setRegionTimeToLive (std::chrono::seconds timeToLive) |
| Sets the timeToLive duration for the region itself. | |
| ExpirationAction | setRegionTimeToLiveAction (ExpirationAction action) |
| Set the timeToLive Action for the region itself. | |
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 RegionAttributesFactory 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.
Constructor & Destructor Documentation
◆ AttributesMutator()
|
explicit |
Internal constructor.
Use Region::getAttributesMutator() to acquire the mutator for a region.
Member Function Documentation
◆ setCacheListener() [1/2]
| void apache::geode::client::AttributesMutator::setCacheListener | ( | const std::shared_ptr< CacheListener > & | aListener | ) |
Sets cache listener for region.
The previous cache listener will be replaced with aListener.
- Parameters
-
aListener cache listener
◆ setCacheListener() [2/2]
| void apache::geode::client::AttributesMutator::setCacheListener | ( | const std::string & | libpath, |
| const std::string & | 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
-
libpath path of the library containing cache listener factory function. factoryFuncName factory function for creating cache listener.
◆ setCacheLoader() [1/2]
| void apache::geode::client::AttributesMutator::setCacheLoader | ( | const std::shared_ptr< CacheLoader > & | aLoader | ) |
Sets cache loader for region.
The previous cache loader will be replaced with aLoader.
- Parameters
-
aLoader cache loader
◆ setCacheLoader() [2/2]
| void apache::geode::client::AttributesMutator::setCacheLoader | ( | const std::string & | libpath, |
| const std::string & | 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
-
libpath path of the library containing cache loader factory function. factoryFuncName factory function for creating cache loader.
◆ setCacheWriter() [1/2]
| void apache::geode::client::AttributesMutator::setCacheWriter | ( | const std::shared_ptr< CacheWriter > & | aWriter | ) |
Sets cache writer for region.
The previous cache writer will be replaced with aWriter.
- Parameters
-
aWriter cache writer
◆ setCacheWriter() [2/2]
| void apache::geode::client::AttributesMutator::setCacheWriter | ( | const std::string & | libpath, |
| const std::string & | 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
-
libpath path of the library containing cache writer factory function. factoryFuncName factory function for creating cache writer.
◆ setEntryIdleTimeout()
| std::chrono::seconds apache::geode::client::AttributesMutator::setEntryIdleTimeout | ( | std::chrono::seconds | idleTimeout | ) |
Sets the idleTimeout duration for region entries.
- Parameters
-
idleTimeout the idleTimeout for entries in this region.
- Returns
- the previous value.
- Exceptions
-
IllegalStateException if the new idleTimeout changes entry expiration from disabled to enabled or enabled to disabled.
◆ setEntryIdleTimeoutAction()
| ExpirationAction apache::geode::client::AttributesMutator::setEntryIdleTimeoutAction | ( | ExpirationAction | action | ) |
Set the idleTimeout Action for region entries.
- Parameters
-
action the idleTimeout ExpirationAction for entries in this region.
- Returns
- the previous value.
◆ setEntryTimeToLive()
| std::chrono::seconds apache::geode::client::AttributesMutator::setEntryTimeToLive | ( | std::chrono::seconds | timeToLive | ) |
Sets the timeToLive duration for region entries.
- Parameters
-
timeToLive the timeToLive for entries in this region.
- Returns
- the previous value.
- Exceptions
-
IllegalStateException if the new timeToLive changes entry expiration from disabled to enabled or enabled to disabled.
◆ setEntryTimeToLiveAction()
| ExpirationAction apache::geode::client::AttributesMutator::setEntryTimeToLiveAction | ( | ExpirationAction | action | ) |
Set the timeToLive Action for region entries.
- Parameters
-
action the timeToLive ExpirationAction for entries in this region.
- Returns
- the previous value.
◆ setLruEntriesLimit()
| uint32_t apache::geode::client::AttributesMutator::setLruEntriesLimit | ( | uint32_t | entriesLimit | ) |
Sets the Maximum entry count in the region before LRU eviction.
- Parameters
-
entriesLimit the number of entries to allow.
- Returns
- the previous value.
- Exceptions
-
IllegalStateException if the new entriesLimit changes LRU from disabled to enabled or enabled to disabled.
◆ setRegionIdleTimeout()
| std::chrono::seconds apache::geode::client::AttributesMutator::setRegionIdleTimeout | ( | std::chrono::seconds | idleTimeout | ) |
Sets the idleTimeout duration for the region itself.
- Parameters
-
idleTimeout the ExpirationAttributes for this region idleTimeout
- Returns
- the previous value.
- Exceptions
-
IllegalStateException if the new idleTimeout changes region expiration from disabled to enabled or enabled to disabled.
◆ setRegionIdleTimeoutAction()
| ExpirationAction apache::geode::client::AttributesMutator::setRegionIdleTimeoutAction | ( | ExpirationAction | action | ) |
Set the idleTimeout Action for the region itself.
- Parameters
-
action the idleTimeout ExpirationAction for this region.
- Returns
- the previous value.
◆ setRegionTimeToLive()
| std::chrono::seconds apache::geode::client::AttributesMutator::setRegionTimeToLive | ( | std::chrono::seconds | timeToLive | ) |
Sets the timeToLive duration for the region itself.
- Parameters
-
timeToLive the ExpirationAttributes for this region timeToLive
- Returns
- the previous value.
- Exceptions
-
IllegalStateException if the new timeToLive changes region expiration from disabled to enabled or enabled to disabled.
◆ setRegionTimeToLiveAction()
| ExpirationAction apache::geode::client::AttributesMutator::setRegionTimeToLiveAction | ( | ExpirationAction | action | ) |
Set the timeToLive Action for the region itself.
- Parameters
-
action the timeToLive ExpirationAction for this region.
- Returns
- the previous value.
Apache Geode C++ Cache API Documentation