VMware Tanzu GemFire Native .NET Reference 10.2.7
Apache::Geode::Client::RegionFactory Class Reference

More...

#include <RegionFactory.hpp>

Public Member Functions

template<class TKey , class TValue >
IRegion< TKey, TValue > ^ Create (String^ regionName)
 Creates a region with the given name. More...
 
template<class TKey , class TValue >
RegionFactorySetCacheListener (ICacheListener< TKey, TValue >^ cacheListener)
 Sets the CacheListener for the RegionAttributes being created. More...
 
RegionFactorySetCacheListener (String^ libPath, String^ factoryFunctionName)
 Sets the library path for the library that will be invoked for the listener of the region. More...
 
template<class TKey , class TValue >
RegionFactorySetCacheLoader (ICacheLoader< TKey, TValue >^ cacheLoader)
 Sets the cache loader for the RegionAttributes being created. More...
 
RegionFactorySetCacheLoader (String^ libPath, String^ factoryFunctionName)
 Sets the library path for the library that will be invoked for the loader of the region. More...
 
template<class TKey , class TValue >
RegionFactorySetCacheWriter (ICacheWriter< TKey, TValue >^ cacheWriter)
 Sets the cache writer for the RegionAttributes being created. More...
 
RegionFactorySetCacheWriter (String^ libPath, String^ factoryFunctionName)
 Sets the library path for the library that will be invoked for the writer of the region. More...
 
RegionFactorySetCachingEnabled (bool cachingEnabled)
 Set caching enabled flag for this region. More...
 
RegionFactorySetCloningEnabled (bool cloningEnabled)
 Set cloning enabled flag for this region. More...
 
RegionFactorySetConcurrencyChecksEnabled (bool concurrencyChecksEnabled)
 Sets concurrency checks enabled flag for this region. More...
 
RegionFactorySetConcurrencyLevel (System::Int32 concurrencyLevel)
 Sets the concurrency level of the next RegionAttributes created. More...
 
RegionFactorySetDiskPolicy (DiskPolicyType diskPolicy)
 Sets the disk policy type for the next RegionAttributes created. More...
 
RegionFactorySetEntryIdleTimeout (ExpirationAction action, TimeSpan idleTimeout)
 Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created. More...
 
RegionFactorySetEntryTimeToLive (ExpirationAction action, TimeSpan timeToLive)
 Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created. More...
 
RegionFactorySetInitialCapacity (System::Int32 initialCapacity)
 Sets the entry initial capacity for the RegionAttributes being created. More...
 
RegionFactorySetLoadFactor (Single loadFactor)
 Sets the entry load factor for the next RegionAttributes created. More...
 
RegionFactorySetLruEntriesLimit (System::UInt32 entriesLimit)
 Sets a limit on the number of entries that will be held in the cache. More...
 
template<class TKey , class TValue >
RegionFactorySetPartitionResolver (IPartitionResolver< TKey, TValue >^ partitionresolver)
 Sets the PartitionResolver for the RegionAttributes being created. More...
 
RegionFactorySetPartitionResolver (String^ libPath, String^ factoryFunctionName)
 Sets the library path for the library that will be invoked for the partition resolver of the region. More...
 
template<class TKey , class TValue >
RegionFactorySetPersistenceManager (Client::IPersistenceManager< TKey, TValue >^ persistenceManager)
 Sets the persistence manager for the RegionAttributes being created. More...
 
template<class TKey , class TValue >
RegionFactorySetPersistenceManager (Client::IPersistenceManager< TKey, TValue >^ persistenceManager, Properties< String^, String^>^ config)
 Sets the persistence manager for the RegionAttributes being created. More...
 
RegionFactorySetPersistenceManager (String^ libPath, String^ factoryFunctionName)
 Sets the library path for the library that will be invoked for the persistence of the region. More...
 
RegionFactorySetPersistenceManager (String^ libPath, String^ factoryFunctionName, Properties< String^, String^>^ config)
 Sets the library path for the library that will be invoked for the persistence of the region. More...
 
RegionFactorySetPoolName (String^ poolName)
 Set the pool name for a Thin Client region. More...
 
RegionFactorySetRegionIdleTimeout (ExpirationAction action, TimeSpan idleTimeout)
 Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created. More...
 
RegionFactorySetRegionTimeToLive (ExpirationAction action, TimeSpan timeToLive)
 Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created. More...
 

Detailed Description

This interface provides for the configuration and creation of instances of Region.

Member Function Documentation

◆ Create()

template<class TKey , class TValue >
IRegion< TKey, TValue > ^ Apache::Geode::Client::RegionFactory::Create ( String^  regionName)

Creates a region with the given name.

The region is just created locally. It is not created on the server to which this client is connected with.

If Pool attached with Region is in multiusersecure mode then don't use return instance of region as no credential are attached with this instance. Get instance of region from <see cref="Cache.CreateAuthenticatedView" to do the operation on Cache.

Parameters
namethe name of the region to create
Returns
new region
Exceptions
RegionExistsExceptionif a region with the same name is already in this cache
CacheClosedExceptionif the cache is closed
OutOfMemoryExceptionif the memory allocation failed
RegionCreationFailedExceptionif the call fails due to incomplete mirror initialization
InitFailedExceptionif the optional PersistenceManager fails to initialize
UnknownExceptionotherwise

◆ SetCacheListener() [1/2]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheListener ( ICacheListener< TKey, TValue >^  cacheListener)

Sets the CacheListener for the RegionAttributes being created.

Parameters
cacheListeneruser-defined cache listener, or null for no cache listener
Returns
the instance of RegionFactory

◆ SetCacheListener() [2/2]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheListener ( String^  libPath,
String^  factoryFunctionName 
)

Sets the library path for the library that will be invoked for the listener of the region.

Parameters
libPathlibrary pathname containing the factory function.
factoryFunctionNameName of factory function that creates a CacheListener for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheListener for a managed library.
Returns
the instance of RegionFactory

◆ SetCacheLoader() [1/2]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheLoader ( ICacheLoader< TKey, TValue >^  cacheLoader)

Sets the cache loader for the RegionAttributes being created.

Parameters
cacheLoadera user-defined cache loader, or null for no cache loader
Returns
the instance of RegionFactory

◆ SetCacheLoader() [2/2]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheLoader ( String^  libPath,
String^  factoryFunctionName 
)

Sets the library path for the library that will be invoked for the loader of the region.

Parameters
libPathlibrary pathname containing the factory function.
factoryFunctionNameName of factory function that creates a CacheLoader for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheLoader for a managed library.
Returns
the instance of RegionFactory

◆ SetCacheWriter() [1/2]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheWriter ( ICacheWriter< TKey, TValue >^  cacheWriter)

Sets the cache writer for the RegionAttributes being created.

Parameters
cacheWriteruser-defined cache writer, or null for no cache writer
Returns
the instance of RegionFactory

◆ SetCacheWriter() [2/2]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCacheWriter ( String^  libPath,
String^  factoryFunctionName 
)

Sets the library path for the library that will be invoked for the writer of the region.

Parameters
libPathlibrary pathname containing the factory function.
factoryFunctionNameName of factory function that creates a CacheWriter for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheWriter for a managed library.
Returns
the instance of RegionFactory

◆ 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 ScopeType.Local scope.

Parameters
cachingEnabledif true, cache data for this region in this process.
Returns
the instance of RegionFactory

◆ SetCloningEnabled()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetCloningEnabled ( bool  cloningEnabled)

Set cloning enabled flag for this region.

If set to false, then there is no cloning will take place in case of delta. Delta will be applied on the old value which will change old value in-place.

The default if not set is 'false' of ScopeType.Local scope.

Parameters
cloningEnabledif true, clone old value before applying delta so that in-place change would not occour..
Returns
the instance of RegionFactory

◆ SetConcurrencyChecksEnabled()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetConcurrencyChecksEnabled ( bool  concurrencyChecksEnabled)

Sets concurrency checks enabled flag for this region.

If set to false, then the version checks will not occur.

The default if not set is 'true'

Parameters
concurrencyChecksEnabledif true, version checks for region entries will occur.
Returns
the instance of RegionFactory

◆ SetConcurrencyLevel()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetConcurrencyLevel ( System::Int32  concurrencyLevel)

Sets the concurrency level of the next RegionAttributes created.

This value is used in initializing the map that holds the entries.

Parameters
concurrencyLevelthe concurrency level of the entry map
Exceptions
IllegalArgumentExceptionif concurrencyLevel is nonpositive
Returns
the instance of RegionFactory

◆ SetDiskPolicy()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetDiskPolicy ( DiskPolicyType  diskPolicy)

Sets the disk policy type for the next RegionAttributes created.

Parameters
diskPolicythe disk policy to use for the region
Returns
the instance of RegionFactory

◆ SetEntryIdleTimeout()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetEntryIdleTimeout ( ExpirationAction  action,
TimeSpan  idleTimeout 
)

Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created.

Parameters
actionThe expiration action for which to set the timeout.
idleTimeoutthe idleTimeout in seconds for entries in this region.
Returns
the instance of RegionFactory

◆ SetEntryTimeToLive()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetEntryTimeToLive ( ExpirationAction  action,
TimeSpan  timeToLive 
)

Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created.

Parameters
actionThe expiration action for which to set the timeout.
timeToLivethe timeToLive in seconds for entries in this region.
Returns
the instance of RegionFactory

◆ SetInitialCapacity()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetInitialCapacity ( System::Int32  initialCapacity)

Sets the entry initial capacity for the RegionAttributes being created.

This value is used in initializing the map that holds the entries.

Parameters
initialCapacitythe initial capacity of the entry map
Exceptions
IllegalArgumentExceptionif initialCapacity is nonpositive
Returns
the instance of RegionFactory

◆ SetLoadFactor()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetLoadFactor ( Single  loadFactor)

Sets the entry load factor for the next RegionAttributes created.

This value is used in initializing the map that holds the entries.

Parameters
loadFactorthe load factor of the entry map
Exceptions
IllegalArgumentExceptionif loadFactor is nonpositive
Returns
the instance of RegionFactory

◆ SetLruEntriesLimit()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetLruEntriesLimit ( System::UInt32  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.

Parameters
entriesLimitThe limit of the number of entries before eviction starts. Defaults to 0, meaning no LRU actions will used.
Returns
the instance of RegionFactory

◆ SetPartitionResolver() [1/2]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPartitionResolver ( IPartitionResolver< TKey, TValue >^  partitionresolver)

Sets the PartitionResolver for the RegionAttributes being created.

Parameters
partitionresolveruser-defined partition resolver, or null for no partition resolver
Returns
the instance of RegionFactory

◆ SetPartitionResolver() [2/2]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPartitionResolver ( String^  libPath,
String^  factoryFunctionName 
)

Sets the library path for the library that will be invoked for the partition resolver of the region.

Parameters
libPathlibrary pathname containing the factory function.
factoryFunctionNameName of factory function that creates a PartitionResolver for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an IPartitionResolver for a managed library.
Returns
the instance of RegionFactory

◆ SetPersistenceManager() [1/4]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPersistenceManager ( Client::IPersistenceManager< TKey, TValue >^  persistenceManager)

Sets the persistence manager for the RegionAttributes being created.

Parameters
persistenceManagera user-defined persistence manager, or null for no persistence manager
Returns
the instance of RegionFactory

◆ SetPersistenceManager() [2/4]

template<class TKey , class TValue >
RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPersistenceManager ( Client::IPersistenceManager< TKey, TValue >^  persistenceManager,
Properties< String^, String^>^  config 
)

Sets the persistence manager for the RegionAttributes being created.

Parameters
persistenceManagera user-defined persistence manager, or null for no persistence manager
configThe configuration properties to use for the PersistenceManager.
Returns
the instance of RegionFactory

◆ SetPersistenceManager() [3/4]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPersistenceManager ( String^  libPath,
String^  factoryFunctionName 
)

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.

Parameters
libPathThe path of the PersistenceManager shared library.
factoryFunctionNameThe name of the factory function to create an instance of PersistenceManager object.
Returns
the instance of RegionFactory

◆ SetPersistenceManager() [4/4]

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPersistenceManager ( String^  libPath,
String^  factoryFunctionName,
Properties< String^, String^>^  config 
)

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.

Parameters
libPathThe path of the PersistenceManager shared library.
factoryFunctionNameThe name of the factory function to create an instance of PersistenceManager object.
configThe configuration properties to use for the PersistenceManager.
Returns
the instance of RegionFactory

◆ SetPoolName()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetPoolName ( String^  poolName)

Set the pool name for a Thin Client region.

The pool with the name specified must be already created.

Parameters
poolNameThe name of the pool to attach to this region.
Returns
the instance of RegionFactory

◆ SetRegionIdleTimeout()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetRegionIdleTimeout ( ExpirationAction  action,
TimeSpan  idleTimeout 
)

Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created.

Parameters
actionThe expiration action for which to set the timeout.
idleTimeoutthe idleTimeout in seconds for the region as a whole.
Returns
the instance of RegionFactory

◆ SetRegionTimeToLive()

RegionFactory ^ Apache::Geode::Client::RegionFactory::SetRegionTimeToLive ( ExpirationAction  action,
TimeSpan  timeToLive 
)

Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created.

Parameters
actionThe expiration action for which to set the timeout.
timeToLivethe timeToLive in seconds for the region as a whole.
Returns
the instance of RegionFactory

Apache Geode C++ Cache .NET API Documentation