Decrements the value of a key by the delta as an asynchronous operation. If the key doesn't exist, it will be created
and seeded with the defaut initial value 1.
Namespace: CouchbaseAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 0.0.0.0 (0.0.0.0)
Syntaxpublic Task<IOperationResult<ulong>> DecrementAsync(
string key,
ulong delta,
ulong initial,
TimeSpan expiration
)
public Task<IOperationResult<ulong>> DecrementAsync(
string key,
ulong delta,
ulong initial,
TimeSpan expiration
)
Public Function DecrementAsync (
key As String,
delta As ULong,
initial As ULong,
expiration As TimeSpan
) As Task(Of IOperationResult(Of ULong))
Public Function DecrementAsync (
key As String,
delta As ULong,
initial As ULong,
expiration As TimeSpan
) As Task(Of IOperationResult(Of ULong))
public:
virtual Task<IOperationResult<unsigned long long>^>^ DecrementAsync(
String^ key,
unsigned long long delta,
unsigned long long initial,
TimeSpan expiration
) sealed
public:
virtual Task<IOperationResult<unsigned long long>^>^ DecrementAsync(
String^ key,
unsigned long long delta,
unsigned long long initial,
TimeSpan expiration
) sealed
abstract DecrementAsync :
key : string *
delta : uint64 *
initial : uint64 *
expiration : TimeSpan -> Task<IOperationResult<uint64>>
override DecrementAsync :
key : string *
delta : uint64 *
initial : uint64 *
expiration : TimeSpan -> Task<IOperationResult<uint64>>
abstract DecrementAsync :
key : string *
delta : uint64 *
initial : uint64 *
expiration : TimeSpan -> Task<IOperationResult<uint64>>
override DecrementAsync :
key : string *
delta : uint64 *
initial : uint64 *
expiration : TimeSpan -> Task<IOperationResult<uint64>>
Parameters
- key
- Type: System.String
The key to us for the counter.
- delta
- Type: System.UInt64
The number to increment the key by.
- initial
- Type: System.UInt64
The initial value to use. If the key doesn't exist, this value will returned.
- expiration
- Type: System.TimeSpan
The time-to-live (ttl) for the counter.
Return Value
Type:
Task<IOperationResult<UInt64>>The
Task<TResult> object representing the asynchronous operation.
Implements
IBucket.DecrementAsync(String, UInt64, UInt64, TimeSpan)
RemarksIf the key doesn't exist, the server will respond with the initial value. If not the decremented value will be returned.
See Also