An AttributesFactory instance maintains state for creating RegionAttributes instances. The setter methods are used to change the settings that will be used for creating the next attributes instance with the CreateRegionAttributes method. If you create a factory with the default constructor, then the factory is set up to create attributes with all default settings. You can also create a factory by providing a preset RegionAttributes.
Once a RegionAttributes is created, it can only be modified after it has been used to create a Region, and then only by using an AttributesMutator obtained from the region.
ScopeType.DistributedNoAck]
16]
0.75]
16] concurrencyLevel, which is used as a hint for internal sizing. The actual concurrency will vary. Ideally, you should choose a value to accommodate as many threads as will ever concurrently modify values in the region. Using a significantly higher value than you need can waste space and time, and a significantly lower value can lead to thread contention. But overestimates and underestimates within an order of magnitude do not usually have much noticeable impact. A value of one is appropriate when it is known that only one thread will modify and all others will only read.
Public Member Functions | |
| AttributesFactory (RegionAttributes^ regionAttributes) | |
| AttributesFactory () | |
| RegionAttributes^ | CreateRegionAttributes () |
| void | SetCacheListener (String^ libPath, String^ factoryFunctionName) |
| void | SetCacheListener (ICacheListener^ cacheListener) |
| void | SetCacheLoader (String^ libPath, String^ factoryFunctionName) |
| void | SetCacheLoader (ICacheLoader^ cacheLoader) |
| void | SetCacheWriter (String^ libPath, String^ factoryFunctionName) |
| void | SetCacheWriter (ICacheWriter^ cacheWriter) |
| void | SetCachingEnabled (bool cachingEnabled) |
| void | SetClientNotificationEnabled (bool clientNotificationEnabled) |
| void | SetConcurrencyLevel (int32_t concurrencyLevel) |
| void | SetDiskPolicy (DiskPolicyType diskPolicy) |
| void | SetEndpoints (String^ endpoints) |
| void | SetEntryIdleTimeout (ExpirationAction action, uint32_t idleTimeout) |
| void | SetEntryTimeToLive (ExpirationAction action, uint32_t timeToLive) |
| void | SetInitialCapacity (int32_t initialCapacity) |
| void | SetLoadFactor (Single loadFactor) |
| void | SetLruEntriesLimit (uint32_t entriesLimit) |
| void | SetPersistenceManager (String^ libPath, String^ factoryFunctionName, Properties^ config) |
| void | SetPersistenceManager (String^ libPath, String^ factoryFunctionName) |
| void | SetPoolName (String^ poolName) |
| void | SetRegionIdleTimeout (ExpirationAction action, uint32_t idleTimeout) |
| void | SetRegionTimeToLive (ExpirationAction action, uint32_t timeToLive) |
| void | SetScope (ScopeType scopeType) |
| GemStone::GemFire::Cache::AttributesFactory::AttributesFactory | ( | ) | [inline] |
Creates a new AttributesFactory ready to create a RegionAttributes with default settings.
| GemStone::GemFire::Cache::AttributesFactory::AttributesFactory | ( | RegionAttributes^ | regionAttributes | ) |
Creates a new instance of AttributesFactory ready to create a RegionAttributes with the same settings as those in the specified RegionAttributes.
| regionAttributes | attributes used to initialize this AttributesFactory |
| RegionAttributes ^ GemStone::GemFire::Cache::AttributesFactory::CreateRegionAttributes | ( | ) |
Creates a RegionAttributes with the current settings.
RegionAttributes| IllegalStateException | if the current settings violate the compatibility rules. |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheListener | ( | String^ | libPath, | |
| String^ | factoryFunctionName | |||
| ) |
Sets the library path for the library that will be invoked for the listener of the region.
| libPath | library pathname containing the factory function. | |
| factoryFunctionName | Name 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. |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheListener | ( | ICacheListener^ | cacheListener | ) |
Sets the CacheListener for the RegionAttributes being created.
| cacheListener | user-defined cache listener, or null for no cache listener |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheLoader | ( | String^ | libPath, | |
| String^ | factoryFunctionName | |||
| ) |
Sets the library path for the library that will be invoked for the loader of the region.
| libPath | library pathname containing the factory function. | |
| factoryFunctionName | Name 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. |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheLoader | ( | ICacheLoader^ | cacheLoader | ) |
Sets the cache loader for the RegionAttributes being created.
| cacheLoader | a user-defined cache loader, or null for no cache loader |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheWriter | ( | String^ | libPath, | |
| String^ | factoryFunctionName | |||
| ) |
Sets the library path for the library that will be invoked for the writer of the region.
| libPath | library pathname containing the factory function. | |
| factoryFunctionName | Name 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. |
| void GemStone::GemFire::Cache::AttributesFactory::SetCacheWriter | ( | ICacheWriter^ | cacheWriter | ) |
Sets the cache writer for the RegionAttributes being created.
| cacheWriter | user-defined cache writer, or null for no cache writer |
| void GemStone::GemFire::Cache::AttributesFactory::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.
| cachingEnabled | if true, cache data for this region in this process. |
| void GemStone::GemFire::Cache::AttributesFactory::SetClientNotificationEnabled | ( | bool | clientNotificationEnabled | ) |
Enables/disables client noficiations for a Thin client region.
| clientNotificationEnabled | true if client notifications have to be enabled; false otherwise |
| void GemStone::GemFire::Cache::AttributesFactory::SetConcurrencyLevel | ( | int32_t | concurrencyLevel | ) |
Sets the concurrency level of the next RegionAttributes created. This value is used in initializing the map that holds the entries.
| concurrencyLevel | the concurrency level of the entry map |
| IllegalArgumentException | if concurrencyLevel is nonpositive |
| void GemStone::GemFire::Cache::AttributesFactory::SetDiskPolicy | ( | DiskPolicyType | diskPolicy | ) |
Sets the disk policy type for the next RegionAttributes created.
| diskPolicy | the disk policy to use for the region |
| void GemStone::GemFire::Cache::AttributesFactory::SetEndpoints | ( | String^ | endpoints | ) |
Set the endpoints for a Thin Client region.
If the endpoints are set then the region is taken to be a Thin-client region that interacts with the GemFire Java cacheserver.
| endpoints | The list of host:port pairs separated by commas. |
| void GemStone::GemFire::Cache::AttributesFactory::SetEntryIdleTimeout | ( | ExpirationAction | action, | |
| uint32_t | idleTimeout | |||
| ) |
Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created.
| action | The expiration action for which to set the timeout. | |
| idleTimeout | the idleTimeout in seconds for entries in this region. |
| void GemStone::GemFire::Cache::AttributesFactory::SetEntryTimeToLive | ( | ExpirationAction | action, | |
| uint32_t | timeToLive | |||
| ) |
Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created.
| action | The expiration action for which to set the timeout. | |
| timeToLive | the timeToLive in seconds for entries in this region. |
| void GemStone::GemFire::Cache::AttributesFactory::SetInitialCapacity | ( | int32_t | initialCapacity | ) |
Sets the entry initial capacity for the RegionAttributes being created. This value is used in initializing the map that holds the entries.
| initialCapacity | the initial capacity of the entry map |
| IllegalArgumentException | if initialCapacity is nonpositive |
| void GemStone::GemFire::Cache::AttributesFactory::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.
| loadFactor | the load factor of the entry map |
| IllegalArgumentException | if loadFactor is nonpositive |
| void GemStone::GemFire::Cache::AttributesFactory::SetLruEntriesLimit | ( | 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.
| entriesLimit | The limit of the number of entries before eviction starts. Defaults to 0, meaning no LRU actions will used. |
| void GemStone::GemFire::Cache::AttributesFactory::SetPersistenceManager | ( | String^ | libPath, | |
| String^ | factoryFunctionName, | |||
| Properties^ | 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.
| libPath | The path of the PersistenceManager shared library. | |
| factoryFunctionName | The name of the factory function to create an instance of PersistenceManager object. | |
| config | The configuration properties to use for the PersistenceManager. |
| void GemStone::GemFire::Cache::AttributesFactory::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.
| libPath | The path of the PersistenceManager shared library. | |
| factoryFunctionName | The name of the factory function to create an instance of PersistenceManager object. |
| void GemStone::GemFire::Cache::AttributesFactory::SetPoolName | ( | String^ | poolName | ) |
Set the pool name for a Thin Client region.
The pool with the name specified must be already created.
| poolName | The name of the pool to attach to this region. |
| void GemStone::GemFire::Cache::AttributesFactory::SetRegionIdleTimeout | ( | ExpirationAction | action, | |
| uint32_t | idleTimeout | |||
| ) |
Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created.
| action | The expiration action for which to set the timeout. | |
| idleTimeout | the idleTimeout in seconds for the region as a whole. |
| void GemStone::GemFire::Cache::AttributesFactory::SetRegionTimeToLive | ( | ExpirationAction | action, | |
| uint32_t | timeToLive | |||
| ) |
Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created.
| action | The expiration action for which to set the timeout. | |
| timeToLive | the timeToLive in seconds for the region as a whole. |
| void GemStone::GemFire::Cache::AttributesFactory::SetScope | ( | ScopeType | scopeType | ) |
Sets the scope for the next RegionAttributes created.
| scopeType | the type of scope to use for the region |