VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
Provides for the configuration and creation of instances of Region. More...
#include <RegionFactory.hpp>
Public Member Functions | |
| std::shared_ptr< Region > | create (std::string name) |
Create a Region of the given name. | |
| RegionFactory & | setCacheListener (const std::shared_ptr< CacheListener > &aListener) |
Sets the CacheListener for the next RegionAttributes created. | |
| RegionFactory & | setCacheListener (const std::string &libpath, const std::string &factoryFuncName) |
| Sets the library path for the library that will be invoked for the listener of the region. | |
| RegionFactory & | setCacheLoader (const std::shared_ptr< CacheLoader > &cacheLoader) |
Sets the cache loader for the next RegionAttributes created. | |
| RegionFactory & | setCacheLoader (const std::string &libpath, const std::string &factoryFuncName) |
| Sets the library path for the library that will be invoked for the loader of the region. | |
| RegionFactory & | setCacheWriter (const std::shared_ptr< CacheWriter > &cacheWriter) |
Sets the cache writer for the next RegionAttributes created. | |
| RegionFactory & | setCacheWriter (const std::string &libpath, const std::string &factoryFuncName) |
| Sets the library path for the library that will be invoked for the writer of the region. | |
| RegionFactory & | setCachingEnabled (bool cachingEnabled) |
| Set caching enabled flag for this region. | |
| RegionFactory & | setConcurrencyChecksEnabled (bool enable) |
| Enables or disables concurrent modification checks. | |
| RegionFactory & | setConcurrencyLevel (uint8_t concurrencyLevel) |
Sets the concurrency level tof the next RegionAttributes created. | |
| RegionFactory & | setDiskPolicy (const DiskPolicyType diskPolicy) |
Sets the Disk policy type for the next RegionAttributes created. | |
| RegionFactory & | setEntryIdleTimeout (ExpirationAction action, std::chrono::seconds idleTimeout) |
Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created. | |
| RegionFactory & | setEntryTimeToLive (ExpirationAction action, std::chrono::seconds timeToLive) |
Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created. | |
| RegionFactory & | setInitialCapacity (int initialCapacity) |
Sets the entry initial capacity for the next RegionAttributes created. | |
| RegionFactory & | setLoadFactor (float loadFactor) |
Sets the entry load factor for the next RegionAttributes created. | |
| RegionFactory & | setLruEntriesLimit (const uint32_t entriesLimit) |
| Sets a limit on the number of entries that will be held in the cache. | |
| RegionFactory & | setPartitionResolver (const std::shared_ptr< PartitionResolver > &aResolver) |
Sets the PartitionResolver for the next RegionAttributes created. | |
| RegionFactory & | setPartitionResolver (const std::string &libpath, const std::string &factoryFuncName) |
| Sets the library path for the library that will be invoked for the partition resolver of the region. | |
| RegionFactory & | setPersistenceManager (const std::shared_ptr< PersistenceManager > &persistenceManager, const std::shared_ptr< Properties > &config=nullptr) |
Sets the PersistenceManager for the next RegionAttributes created. | |
| RegionFactory & | setPersistenceManager (const std::string &libpath, const std::string &factoryFuncName, const std::shared_ptr< Properties > &config=nullptr) |
| Sets the library path for the library that will be invoked for the persistence of the region. | |
| RegionFactory & | setRegionIdleTimeout (ExpirationAction action, std::chrono::seconds idleTimeout) |
Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created. | |
| RegionFactory & | setRegionTimeToLive (ExpirationAction action, std::chrono::seconds timeToLive) |
Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created. | |
Detailed Description
Provides for the configuration and creation of instances of Region.
Member Function Documentation
◆ create()
| std::shared_ptr< Region > apache::geode::client::RegionFactory::create | ( | std::string | name | ) |
Create a Region of the given name.
- Parameters
-
name the name of the Region.
- Exceptions
-
RegionExistsException if a region is already in this cache CacheClosedException if the cache is closed
◆ setCacheListener() [1/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheListener | ( | const std::shared_ptr< CacheListener > & | aListener | ) |
Sets the CacheListener for the next RegionAttributes created.
- Parameters
-
aListener a user defined CacheListener, nullptr if no listener
- Returns
- a reference to
this
◆ setCacheListener() [2/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheListener | ( | const std::string & | libpath, |
| const std::string & | factoryFuncName | ||
| ) |
Sets the library path for the library that will be invoked for the listener of the region.
- Returns
- a reference to
this
◆ setCacheLoader() [1/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheLoader | ( | const std::shared_ptr< CacheLoader > & | cacheLoader | ) |
Sets the cache loader for the next RegionAttributes created.
- Parameters
-
cacheLoader the cache loader or nullptr if no loader
- Returns
- a reference to
this
◆ setCacheLoader() [2/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheLoader | ( | const std::string & | libpath, |
| const std::string & | factoryFuncName | ||
| ) |
Sets the library path for the library that will be invoked for the loader of the region.
- Returns
- a reference to
this
◆ setCacheWriter() [1/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheWriter | ( | const std::shared_ptr< CacheWriter > & | cacheWriter | ) |
Sets the cache writer for the next RegionAttributes created.
- Parameters
-
cacheWriter the cache writer or nullptr if no cache writer
- Returns
- a reference to
this
◆ setCacheWriter() [2/2]
| RegionFactory & apache::geode::client::RegionFactory::setCacheWriter | ( | const std::string & | libpath, |
| const std::string & | factoryFuncName | ||
| ) |
Sets the library path for the library that will be invoked for the writer of the region.
- Returns
- a reference to
this
◆ setCachingEnabled()
| RegionFactory & apache::geode::client::RegionFactory::setCachingEnabled | ( | bool | cachingEnabled | ) |
Set caching enabled flag for this region.
If set to false, then no data is stored in the local process, but events and distributions will still occur, and the region can still be used to put and remove, etc... The default if not set is 'true', 'false' is illegal for regions of 'local' scope. This also requires that interestLists are turned off for the region.
- Parameters
-
cachingEnabled if true, cache data for this region in this process.
- Returns
- a reference to
this
◆ setConcurrencyChecksEnabled()
| RegionFactory & apache::geode::client::RegionFactory::setConcurrencyChecksEnabled | ( | bool | enable | ) |
Enables or disables concurrent modification checks.
- Since
- 7.0
- Parameters
-
enable whether to perform concurrency checks on operations
- Returns
- a reference to
this
◆ setConcurrencyLevel()
| RegionFactory & apache::geode::client::RegionFactory::setConcurrencyLevel | ( | uint8_t | concurrencyLevel | ) |
Sets the concurrency level tof the next RegionAttributes created.
This value is used in initializing the map that holds the entries.
- Parameters
-
concurrencyLevel the concurrency level of the entry map
- Returns
- a reference to
this
- Exceptions
-
IllegalArgumentException if concurrencyLevel is nonpositive
◆ setDiskPolicy()
| RegionFactory & apache::geode::client::RegionFactory::setDiskPolicy | ( | const DiskPolicyType | diskPolicy | ) |
Sets the Disk policy type for the next RegionAttributes created.
- Parameters
-
diskPolicy the type of disk policy to use for the region
- Returns
- a reference to
this
- Exceptions
-
IllegalArgumentException if diskPolicyType is Invalid
◆ setEntryIdleTimeout()
| RegionFactory & apache::geode::client::RegionFactory::setEntryIdleTimeout | ( | ExpirationAction | action, |
| std::chrono::seconds | idleTimeout | ||
| ) |
Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created.
- Parameters
-
action the expiration action for entries in this region. idleTimeout the idleTimeout for entries in this region.
- Returns
- a reference to
this
◆ setEntryTimeToLive()
| RegionFactory & apache::geode::client::RegionFactory::setEntryTimeToLive | ( | ExpirationAction | action, |
| std::chrono::seconds | timeToLive | ||
| ) |
Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created.
- Parameters
-
action the expiration action for entries in this region. timeToLive the timeToLive for entries in this region.
- Returns
- a reference to
this
◆ setInitialCapacity()
| RegionFactory & apache::geode::client::RegionFactory::setInitialCapacity | ( | int | initialCapacity | ) |
Sets the entry initial capacity for the next RegionAttributes created.
This value is used in initializing the map that holds the entries.
- Parameters
-
initialCapacity the initial capacity of the entry map
- Returns
- a reference to
this
- Exceptions
-
IllegalArgumentException if initialCapacity is negative.
◆ setLoadFactor()
| RegionFactory & apache::geode::client::RegionFactory::setLoadFactor | ( | float | loadFactor | ) |
Sets the entry load factor for the next RegionAttributes created.
This value is used in initializing the map that holds the entries.
- Parameters
-
loadFactor the load factor of the entry map
- Returns
- a reference to
this
- Exceptions
-
IllegalArgumentException if loadFactor is nonpositive
◆ setLruEntriesLimit()
| RegionFactory & apache::geode::client::RegionFactory::setLruEntriesLimit | ( | const uint32_t | entriesLimit | ) |
Sets a limit on the number of entries that will be held in the cache.
If a new entry is added while at the limit, the cache will evict the least recently used entry. Defaults to 0, meaning no LRU actions will used.
- Parameters
-
entriesLimit number of enteries to keep in region
- Returns
- a reference to
this
◆ setPartitionResolver() [1/2]
| RegionFactory & apache::geode::client::RegionFactory::setPartitionResolver | ( | const std::shared_ptr< PartitionResolver > & | aResolver | ) |
Sets the PartitionResolver for the next RegionAttributes created.
- Parameters
-
aResolver a user defined PartitionResolver, nullptr if no resolver
- Returns
- a reference to
this
◆ setPartitionResolver() [2/2]
| RegionFactory & apache::geode::client::RegionFactory::setPartitionResolver | ( | const std::string & | libpath, |
| const std::string & | factoryFuncName | ||
| ) |
Sets the library path for the library that will be invoked for the partition resolver of the region.
- Returns
- a reference to
this
◆ setPersistenceManager() [1/2]
| RegionFactory & apache::geode::client::RegionFactory::setPersistenceManager | ( | const std::shared_ptr< PersistenceManager > & | persistenceManager, |
| const std::shared_ptr< Properties > & | config = nullptr |
||
| ) |
Sets the PersistenceManager for the next RegionAttributes created.
- Parameters
-
persistenceManager a user defined PersistenceManager, nullptr if no persistenceManager
- Returns
- a reference to
this
◆ setPersistenceManager() [2/2]
| RegionFactory & apache::geode::client::RegionFactory::setPersistenceManager | ( | const std::string & | libpath, |
| const std::string & | factoryFuncName, | ||
| const std::shared_ptr< Properties > & | config = nullptr |
||
| ) |
Sets the library path for the library that will be invoked for the persistence of the region.
If the region is being created from a client on a server, or on a server directly, then this must be used to set the PersistenceManager.
- Returns
- a reference to
this
◆ setRegionIdleTimeout()
| RegionFactory & apache::geode::client::RegionFactory::setRegionIdleTimeout | ( | ExpirationAction | action, |
| std::chrono::seconds | idleTimeout | ||
| ) |
Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created.
- Parameters
-
action the expiration action for entries in this region. idleTimeout the idleTimeout for the region as a whole.
- Returns
- a reference to
this
◆ setRegionTimeToLive()
| RegionFactory & apache::geode::client::RegionFactory::setRegionTimeToLive | ( | ExpirationAction | action, |
| std::chrono::seconds | timeToLive | ||
| ) |
Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created.
- Parameters
-
action the expiration action for entries in this region. timeToLive the timeToLive for the region as a whole.
- Returns
- a reference to
this
Apache Geode C++ Cache API Documentation