NamedCacheGetMetadata Method (String, Boolean)

ScaleOut Software NamedCache API
Gets server metadata and user-defined index values for an object in the named cache.

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

public ExtendedObjectMetadata GetMetadata(
	string id,
	bool acquireLock
)

Parameters

id
Type: SystemString
Object identifier.
acquireLock
Type: SystemBoolean
If true, indicates that the method should attempt to acquire a lock on the object when reading it from the server.

Return Value

Type: ExtendedObjectMetadata
If the object identified by id is found in the cache, the object's ExtendedObjectMetadata is returned. If the object is not found in the cache, null is returned.
Exceptions

ExceptionCondition
ObjectLockedExceptionThrown if acquireLock is true but the object is locked by another client.
StateServerExceptionThrown if ScaleOut StateServer is unavailable or has experienced an internal error.
ReadThroughTimeoutExceptionThrown if GeoServer pull replication is used on this NamedCache and a remote read of an 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 acquireLock parameter is true, this call will block until the lock is acquired or the MaxLockAttempts limit has been met. The lock affects the entire object, not just its metadata, and can be released through a call to ReleaseLock(String), Update(String, Object, Boolean), Remove(String), or SetMetadata(String, ObjectMetadata, Boolean). If no subsequent call is made, the lock will automatically expire after approximately 90 seconds. Passing true to an object that is already locked by the same instance of the NamedCache will refresh the lock by resetting the 90 second lock timeout.

If GeoServer pull replication is being used, the NamedCache's DefaultGeoServerReadMode property will determine this GetMetadata overload's GeoServer read behavior when accessing an object's metadata in a remote store. Also, note that doing a locking retrieval of an object's metadata will cause GeoServer pull replication to move the master copy of the associated object into the local store.

See Also

Reference