NamedCacheAcquireLock Method (Guid)

ScaleOut Software NamedCache API
Locks the cached object in SOSS to prevent other clients from updating or removing it.

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

public void AcquireLock(
	Guid id
)

Parameters

id
Type: SystemGuid
Object identifier.
Exceptions

ExceptionCondition
ObjectLockedExceptionThrown if the object is already locked by another client.
ObjectNotFoundExceptionThrown if the object does not exist.
StateServerExceptionThrown if ScaleOut StateServer is unavailable or has experienced an internal error.
ReadThroughTimeoutExceptionThrown if GeoServer pull replication is configured and the local store is unable to take over mastership of the object after exceeding the number of retries specified by MaxReadThroughPendingAttempts.
Remarks

This call will block until the lock is acquired or the MaxLockAttempts limit has been met. The lock is released through a call to ReleaseLock(Byte), Update(Byte, Object, Boolean), SetMetadata(Byte, ObjectMetadata, Boolean), or Remove(Byte). Setting the object to a new value through ItemByte while UseLocking is true will also cause the lock to be released. If no subsequent call is made, the lock will expire after approximately 90 seconds. Calling this method on an instance of the NamedCache that already has a lock on the cached object will reset the 90 second lock timeout.

If GeoServer pull replication is being used, this call will cause the master object to migrate to the local store.

See Also

Reference