Writes a new object to the space.
| C# | Visual Basic | Visual C++ | J# |
[ObsoleteAttribute("Use Write() with the appropriate WriteModifiers instead.")] ILeaseContext<T> Write<T>( T obj, ITransaction tx, long leaseTime, long timeout, UpdateModifiers modifiers )
<ObsoleteAttribute("Use Write() with the appropriate WriteModifiers instead.")> _ Function Write(Of T) ( _ obj As T, _ tx As ITransaction, _ leaseTime As Long, _ timeout As Long, _ modifiers As UpdateModifiers _ ) As ILeaseContext(Of T)
[ObsoleteAttribute(L"Use Write() with the appropriate WriteModifiers instead.")] generic<typename T> ILeaseContext<T>^ Write( T obj, ITransaction^ tx, long long leaseTime, long long timeout, UpdateModifiers modifiers )
- T
- Type of object to write.
- obj (T)
- The object to write.
- tx (ITransaction)
- The transaction (if any) under which to work.
- leaseTime (Int64)
- The requested lease time, in milliseconds.
- timeout (Int64)
- How long the client is willing to wait for a transactionally proper matching entry.
- modifiers (UpdateModifiers)
- Operation modifiers.
A lease handle on successful write (null if NoWriteLease is set).
| Exception | Condition |
|---|---|
| EntryAlreadyInSpaceException | An entry with matching ID exists in space (UpdateModifiers.WriteOnly). |
| EntryNotInSpaceException | An entry with matching ID does not exist in space (UpdateModifiers.UpdateOnly). |
| OperationTimeoutException | Timeout expired after waiting for a transactional proper matching entry (when using UpdateModifiers.UpdateOrWrite). |
| 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. |
