NamedCacheRetrieve Method (CachedObjectId, RetrieveOptions)

ScaleOut Software NamedCache API
Retrieves an object from the named cache.

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

public Object Retrieve(
	CachedObjectId id,
	RetrieveOptions options
)

Parameters

id
Type: Soss.ClientCachedObjectId
Object identifier.
options
Type: Soss.ClientRetrieveOptions
A set of RetrieveOptions options that control locking, GeoServer behavior, and read-through logic for the Retrieve call. These options override any default behaviors that are specified at the named cache level.

Return Value

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

ExceptionCondition
ObjectLockedExceptionThrown if options parameter requests a lock 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

This method optionally locks the object in SOSS to prevent other clients from updating or removing the object. The UseLocking property is not taken into consideration by this method. If the options parameter asks for a lock, this call will block until the lock is acquired or the MaxLockAttempts limit has been met. The lock affects both an object and its metadata, and it can be released through a call to ReleaseLock(CachedObjectId), Update(CachedObjectId, Object, Boolean), Remove(CachedObjectId), or SetMetadata(CachedObjectId, ObjectMetadata, Boolean). If no subsequent call is made, the lock will automatically expire after approximately 90 seconds. Re-locking an object that is already locked by the same instance of the NamedCache will refresh the lock by resetting the 90 second lock timeout.
See Also

Reference