BackingStorePolicy Class

ScaleOut Software NamedCache API
Contains options to control how a named cache interacts with a backing store. A BackingStorePolicy is associated with a NamedCache and IBackingStore instance though a call to SetBackingStoreAdapter(IBackingStore, BackingStorePolicy).
Inheritance Hierarchy


Namespace:  Soss.Client
Assembly:  soss_namedcache (in soss_namedcache.dll) Version:

public class BackingStorePolicy

The BackingStorePolicy type exposes the following members.


Public methodBackingStorePolicy
Creates a BackingStorePolicy object with all options set to false.
Public methodBackingStorePolicy(Boolean, Boolean, Boolean)
Creates a BackingStorePolicy object.

Public propertyEnableAsyncOperations
Indicates whether this client will handle asynchronous refresh-ahead/write-behind operations.
Public propertyEnableReadThrough
If true, a client will populate the StateServer automatically from a database (or other type of backing store) when a cache miss occurs by invoking the Load(CachedObjectId) method.
Public propertyEnableWriteThrough
If true, a client will synchronously write changes to a database (or other type of backing store) when a cached object is updated or created in the cache by invoking the Store(CachedObjectId, Object) method.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(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.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

The BackingStorePolicy class controls read-through, write-through, refresh-ahead, and write-behind behavior when ScaleOut StateServer is being used as cache for a persistent backing store (such as a database). Use the EnableAsyncOperations property to enable asynchronous refresh-ahead and write-behind operations.

If read-through operations are enabled, it is not desirable for every client process to simultaneously query the database when a cache miss occurs, so the EnableReadThrough property will affect the behavior of the NamedCaches's Retrieve(CachedObjectId, Boolean), Get(CachedObjectId), and ItemCachedObjectId methods when a cache miss occurs. The first client to perform a retrieval operation on an object that's missing from the cache will have its Load(CachedObjectId) implementation invoked. While the backing store is being queried, other clients requesting this object will repeatedly poll until the object has been inserted into the cache. The frequency of the polling behavior is controlled through the NamedCache's ReadPendingRetryInterval and MaxReadThroughPendingAttempts properties.

The EnableWriteThrough property is used to indicate to the StateServer that the client will be performing write-through operations via an implementation of Store(CachedObjectId, Object).

Changing properties of the BackingStorePolicy after a call to SetBackingStoreAdapter(IBackingStore, BackingStorePolicy) will not change the named cache's behavior--SetBackingStoreAdapter(IBackingStore, BackingStorePolicy) must be called again for the new policy options to take effect.

See Also