Click or drag to resize
AttributesFactory Class

Note: This API is now obsolete.

Factory class to create instances of RegionAttributes.
Inheritance Hierarchy
SystemObject
  [T:GemStone.GemFire.Cache.Internal.UMWrap<gemfire::AttributesFactory>]
    GemStone.GemFire.CacheAttributesFactory

Namespace: GemStone.GemFire.Cache
Assembly: 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>]

The AttributesFactory type exposes the following members.

Constructors
  NameDescription
Public methodAttributesFactory
Creates a new AttributesFactory ready to create a RegionAttributes with default settings.
Public methodAttributesFactory(RegionAttributes)
Creates a new instance of AttributesFactory ready to create a RegionAttributes with the same settings as those in the specified RegionAttributes.
Top
Methods
  NameDescription
Public methodCreateRegionAttributes
Creates a RegionAttributes with the current settings.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetCacheListener(ICacheListener)
Sets the CacheListener for the RegionAttributes being created.
Public methodSetCacheListener(String, String)
Sets the library path for the library that will be invoked for the listener of the region.
Public methodSetCacheLoader(ICacheLoader)
Sets the cache loader for the RegionAttributes being created.
Public methodSetCacheLoader(String, String)
Sets the library path for the library that will be invoked for the loader of the region.
Public methodSetCacheWriter(ICacheWriter)
Sets the cache writer for the RegionAttributes being created.
Public methodSetCacheWriter(String, String)
Sets the library path for the library that will be invoked for the writer of the region.
Public methodSetCachingEnabled
Set caching enabled flag for this region.
Public methodSetClientNotificationEnabled Obsolete.
Enables/disables client noficiations for a Thin client region.
Public methodSetCloningEnabled
Set cloning enabled flag for this region.
Public methodSetConcurrencyChecksEnabled
Sets concurrency checks enabled flag for this region.
Public methodSetConcurrencyLevel
Sets the concurrency level of the next RegionAttributes created. This value is used in initializing the map that holds the entries.
Public methodSetDiskPolicy
Sets the disk policy type for the next RegionAttributes created.
Public methodSetEndpoints Obsolete.
Set the endpoints for a Thin Client region.
Public methodSetEntryIdleTimeout
Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created.
Public methodSetEntryTimeToLive
Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created.
Public methodSetInitialCapacity
Sets the entry initial capacity for the RegionAttributes being created. This value is used in initializing the map that holds the entries.
Public methodSetLoadFactor
Sets the entry load factor for the next RegionAttributes created. This value is used in initializing the map that holds the entries.
Public methodSetLruEntriesLimit
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.
Public methodSetPartitionResolver(IPartitionResolver)
Sets the PartitionResolver for the RegionAttributes being created.
Public methodSetPartitionResolver(String, String)
Sets the library path for the library that will be invoked for the partition resolver of the region.
Public methodSetPersistenceManager(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.
Public methodSetPersistenceManager(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.
Public methodSetPoolName
Set the pool name for a Thin Client region.
Public methodSetRegionIdleTimeout
Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes created.
Public methodSetRegionTimeToLive
Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created.
Public methodSetScope Obsolete.
Sets the scope for the next RegionAttributes created.
Public methodToString
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 Also