Replaces a document for a given key if it exists, otherwise fails.
Namespace: Couchbase.CoreAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
SyntaxIOperationResult<T> Replace<T>(
string key,
T value,
ulong cas,
TimeSpan expiration
)
IOperationResult<T> Replace<T>(
string key,
T value,
ulong cas,
TimeSpan expiration
)
Function Replace(Of T) (
key As String,
value As T,
cas As ULong,
expiration As TimeSpan
) As IOperationResult(Of T)
Function Replace(Of T) (
key As String,
value As T,
cas As ULong,
expiration As TimeSpan
) As IOperationResult(Of T)
generic<typename T>
IOperationResult<T>^ Replace(
String^ key,
T value,
unsigned long long cas,
TimeSpan expiration
)
generic<typename T>
IOperationResult<T>^ Replace(
String^ key,
T value,
unsigned long long cas,
TimeSpan expiration
)
abstract Replace :
key : string *
value : 'T *
cas : uint64 *
expiration : TimeSpan -> IOperationResult<'T>
abstract Replace :
key : string *
value : 'T *
cas : uint64 *
expiration : TimeSpan -> IOperationResult<'T>
Parameters
- key
- Type: System.String
The unique key for indexing.
- value
- Type: T
The value for the key.
- cas
- Type: System.UInt64
The CAS (Check and Set) value for optimistic concurrency.
- expiration
- Type: System.TimeSpan
The time-to-live (ttl) for the key.
Type Parameters- T
- The Type of the value to be inserted.
Return Value
Type:
IOperationResult<T>An object implementing the
IOperationResult<T>interface.
See Also