NamedCacheItem Property (CachedObjectId)

ScaleOut Software NamedCache API
Gets or sets a cached item using default parameters.

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

public Object this[
	CachedObjectId id
] { get; set; }

Parameters

id
Type: Soss.ClientCachedObjectId
Identifier of the object in the cache.

Return Value

Type: Object
The object stored in the cache, or null if the object is not in the cache.
Exceptions

ExceptionCondition
ObjectLockedExceptionThrown if UseLocking is true but the object is locked by another client.
StateServerExceptionThrown if ScaleOut StateServer is unavailable or has experienced an internal error.
ReadThroughTimeoutExceptionThrown if backing store read-through or GeoServer pull replication is used with this NamedCache and the retrieval of the object is delayed beyond the number of retries specified by MaxReadThroughPendingAttempts.
Remarks

If UseLocking is true then a "get" operation will cause the object to be locked in the SOSS server, and no other clients will be able to acquire a lock until the lock from this instance of the NamedCache is released (either by setting the object to a new value or calling ReleaseLock).

The "set" operation will either add a new object to the named cache (using policies defined in DefaultCreatePolicy) or update an existing item with the same ID. Passing a null value will cause an object to be removed from the cache. The UseLocking property is honored when setting a cached item to null, so the API will attempt to acquire a lock on the object prior to removing it if UseLocking is true.

Note that every get/set call will cause a round trip to the SOSS service and could result in the retrieval or update of a cached object across the network.

If GeoServer pull replication is being used, the NamedCache's DefaultGeoServerReadMode property will determine this getter's GeoServer read behavior when accessing an object in a remote store.

See Also

Reference