Namespace: Soss.Client
Assembly: soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Parameters
- id
- Type: SystemGuid
Object identifier. - obj
- Type: SystemObject
The new value for the object in the shared cache. The argument must be serializable, and it cannot be null. - unlockAfterUpdate
- Type: SystemBoolean
If the NamedCache instance is not holding a lock for the specified object, this parameter is ignored.
If unlockAfterUpdate is true and the NamedCache is holding a lock for the object then the lock will be released when the update operation completes.
If unlockAfterUpdate is false and the NamedCache is holding a lock for the object then the lock will continue to be held when the update operation completes.
Exception | Condition |
---|---|
ObjectNotFoundException | Thrown if the object to update does not exist in the cache. |
StateServerException | Thrown if ScaleOut StateServer is unavailable or has experienced an internal error. |
ArgumentNullException | Thrown if obj is null. |
The Update(Guid, Object, Boolean) method updates an object in the named cache and allows for fine-grained control over locking of the object. Unlike the ItemGuid accessor, the Update(Guid, Object, Boolean) method does not honor the UseLocking property. The AcquireLock(Guid) or Retrieve(Guid, Boolean) method must be called prior to Update(Guid, Object, Boolean) if the object needs to be locked.
Care should be taken when performing unlocked updates on objects. An unlocked update will not block for locks held by another clients, so other clients may have the object data changed underneath them despite the locks they hold.