Note: This API is now obsolete.
Inheritance HierarchySystemObject [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>] GemStone.GemFire.CacheAttributesFactory
Namespace: GemStone.GemFire.CacheAssembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntax[ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public sealed class AttributesFactory : [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>]
<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>
Public NotInheritable Class AttributesFactory
Inherits [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>]
[ObsoleteAttribute(L"Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public ref class AttributesFactory sealed : public [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>]
[<SealedAttribute>]
[<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>]
type AttributesFactory =
class
inherit [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>]
end
The AttributesFactory type exposes the following members.
Constructors
| Name | Description |
---|
 | AttributesFactory |
Creates a new AttributesFactory ready to create
a RegionAttributes with default settings.
|
 | AttributesFactory(RegionAttributes) |
Creates a new instance of AttributesFactory ready to create
a RegionAttributes with the same settings as those in the
specified RegionAttributes.
|
Top
Methods
| Name | Description |
---|
 | CreateRegionAttributes |
Creates a RegionAttributes with the current settings.
|
 | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
 | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
 | GetType | Gets the Type of the current instance. (Inherited from Object.) |
 | SetCacheListener(ICacheListener) |
Sets the CacheListener for the RegionAttributes being created.
|
 | SetCacheListener(String, String) |
Sets the library path for the library that will be invoked for the listener of the region.
|
 | SetCacheLoader(ICacheLoader) |
Sets the cache loader for the RegionAttributes being created.
|
 | SetCacheLoader(String, String) |
Sets the library path for the library that will be invoked for the loader of the region.
|
 | SetCacheWriter(ICacheWriter) |
Sets the cache writer for the RegionAttributes being created.
|
 | SetCacheWriter(String, String) |
Sets the library path for the library that will be invoked for the writer of the region.
|
 | SetCachingEnabled |
Set caching enabled flag for this region.
|
 | SetClientNotificationEnabled | Obsolete.
Enables/disables client noficiations for a Thin client region.
|
 | SetCloningEnabled |
Set cloning enabled flag for this region.
|
 | SetConcurrencyChecksEnabled |
Sets concurrency checks enabled flag for this region.
|
 | SetConcurrencyLevel |
Sets the concurrency level of the next RegionAttributes
created. This value is used in initializing the map that holds the entries.
|
 | SetDiskPolicy |
Sets the disk policy type for the next RegionAttributes created.
|
 | SetEndpoints | Obsolete.
Set the endpoints for a Thin Client region.
|
 | SetEntryIdleTimeout |
Sets the idleTimeout expiration attributes for region entries for the next
RegionAttributes created.
|
 | SetEntryTimeToLive |
Sets the timeToLive expiration attributes for region entries for the next
RegionAttributes created.
|
 | SetInitialCapacity |
Sets the entry initial capacity for the RegionAttributes
being created. This value is used in initializing the map that
holds the entries.
|
 | SetLoadFactor |
Sets the entry load factor for the next RegionAttributes
created. This value is
used in initializing the map that holds the entries.
|
 | SetLruEntriesLimit |
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.
|
 | SetPartitionResolver(IPartitionResolver) |
Sets the PartitionResolver for the RegionAttributes being created.
|
 | SetPartitionResolver(String, String) |
Sets the library path for the library that will be invoked for the partition resolver of the region.
|
 | SetPersistenceManager(String, String) |
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.
|
 | SetPersistenceManager(String, String, Properties) |
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.
|
 | SetPoolName |
Set the pool name for a Thin Client region.
|
 | SetRegionIdleTimeout |
Sets the idleTimeout expiration attributes for the region itself for the
next RegionAttributes created.
|
 | SetRegionTimeToLive |
Sets the timeToLive expiration attributes for the region itself for the
next RegionAttributes created.
|
 | SetScope | Obsolete.
Sets the scope for the next RegionAttributes created.
|
 | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
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.
Attributes
Callbacks
- ICacheLoader [default: null]
- User-implemented plug-in for loading data on cache misses.
see SetCacheLoader(ICacheLoader),
[!:RegionAttributes.CacheLoader] - ICacheWriter [default: null]
- User-implemented plug-in for intercepting cache modifications, e.g.
for writing to an external data source.
see SetCacheWriter(ICacheWriter),
[!:RegionAttributes.CacheWriter] - ICacheListener [default: null]
- User-implemented plug-in for receiving and handling cache-related events.
see SetCacheListener(ICacheListener),
[!:RegionAttributes.CacheListener] - IPartitionResolver [default: null]
- User-implemented plug-in for custom partitioning.
see SetPartitionResolver(IPartitionResolver),
[!:RegionAttributes.PartitionResolver]
Expiration
- RegionTimeToLive [default: no expiration]
- Expiration configuration for the entire region based on the
lastModifiedTime ( [!:CacheStatistics.LastModifiedTime] ).
see SetRegionTimeToLive(ExpirationAction, UInt32),
[!:RegionAttributes.RegionTimeToLive],
[!:AttributesMutator.SetRegionTimeToLive] - RegionIdleTimeout [default: no expiration]
- Expiration configuration for the entire region based on the
lastAccessedTime ( [!:CacheStatistics.LastAccessedTime] ).
see SetRegionIdleTimeout(ExpirationAction, UInt32),
[!:RegionAttributes.RegionIdleTimeout],
[!:AttributesMutator.SetRegionIdleTimeout] - EntryTimeToLive [default: no expiration]
- Expiration configuration for individual entries based on the
lastModifiedTime ( [!:CacheStatistics.LastModifiedTime] ).
see SetEntryTimeToLive(ExpirationAction, UInt32),
[!:RegionAttributes.EntryTimeToLive],
[!:AttributesMutator.SetEntryTimeToLive] - EntryIdleTimeout [default: no expiration]
- Expiration configuration for individual entries based on the
lastAccessedTime ( [!:CacheStatistics.LastAccessedTime] ).
see SetEntryIdleTimeout(ExpirationAction, UInt32),
[!:RegionAttributes.EntryIdleTimeout],
[!:AttributesMutator.SetEntryIdleTimeout]
Distribution
- ScopeType [default:ScopeType.DistributedNoAck]
- The C++ cache can contain either local regions or distributed regions.
Distributed regions are configured with servers that they distribute
their operations to upto. Locally scoped regions do not have any
distribution behavior. GFE native client regions scoped as
ScopeType.DistributedNoAck and ScopeType.DistributedAck have identical
distribution behavior.
see SetScope(ScopeType),
[!:RegionAttributes.Scope]
Storage
- InitialCapacity [default:16]
- The initial capacity of the map used for storing the entries.
see SetInitialCapacity(Int32),
[!:RegionAttributes.InitialCapacity] - LoadFactor [default:0.75]
- The load factor of the map used for storing the entries.
see SetLoadFactor(Single),
[!:RegionAttributes.LoadFactor] - ConcurrencyLevel [default:16]
- The allowed concurrency among updates to values in the region
is guided by the 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.
see SetConcurrencyLevel(Int32),
[!:RegionAttributes.ConcurrencyLevel]
See AlsoReference
[!:Region.CreateSubRegion]