Update an object with a SpaceID, blocking if locked under another transaction.

C# | Visual Basic | Visual C++ | J# |
T Update<T>( T obj, ITransaction tx, long leaseTime, long timeout )
Function Update(Of T) ( _ obj As T, _ tx As ITransaction, _ leaseTime As Long, _ timeout As Long _ ) As T
generic<typename T> T Update( T obj, ITransaction^ tx, long long leaseTime, long long timeout )

- T
- Type of object to update.

- obj (T)
- An object with a SpaceID defined.
- tx (ITransaction)
- The transaction (if any) under which to work.
- leaseTime (Int64)
- The requested lease time of the updated entity, in milliseconds; 0 means retain the original lease.
- timeout (Int64)
- How long the client is willing to wait for a transactionally proper matching entry.

Previous value on successful update, null if object was written (not updated).

Exception | Condition |
---|---|
EntryNotInSpaceException | An entry with matching ID does not exist in space. |
OperationTimeoutException | Timeout expired (when using UpdateModifiers.UpdateOrWrite). |
UnusableEntryException | A serialized field of the object being read cannot be deserialized. |
TransactionException | Transaction error occured. |
EntryVersionConflictException | Operation is rejected as a result of optimistic locking version conflict. |
InactiveSpaceException | The space is in backup mode and therefore is not active. |