NamedCacheSetMetadata Method (Byte, ObjectMetadata, Boolean)

ScaleOut Software NamedCache API
Creates and updates settable index values for a cached object and optionally unlocks the object.

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

public void SetMetadata(
	byte[] id,
	ObjectMetadata metadata,
	bool unlock
)

Parameters

id
Type: SystemByte
Object identifier (must be either 16 or 32 bytes in length).
metadata
Type: Soss.ClientObjectMetadata
The new metadata for the object, containing a collection of index values.
unlock
Type: SystemBoolean
If the object was previously locked with the current SossCahce and unlock is true then the object will be unlocked after the operation completes.
Exceptions

ExceptionCondition
ObjectNotFoundExceptionThrown if the object to update does not exist in the shared cache.
ObjectLockedExceptionThrown if the lock on the cached object exceeded the 90 second timeout period and another client acquired the lock.
StateServerExceptionThrown if ScaleOut StateServer is unavailable or has experienced an internal error.
ArgumentNullExceptionThrown if metadata is null.
Remarks

The SetMetadata(Byte, ObjectMetadata, Boolean) method does not honor the UseLocking property. Use the AcquireLock(Byte) or Retrieve(Byte, Boolean) methods prior to calling SetMetadata(Byte, ObjectMetadata, Boolean) if the object needs to be locked.

Care should be taken when performing unlocked metadata changes on objects. An unlocked SetMetadata(Byte, ObjectMetadata, Boolean) operation will not block for locks held by another clients, so other clients may have the object metadata changed underneath them despite the locks they hold.

See Also

Reference