Class IncrementOptions
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class IncrementOptions : object, ITimeoutOptions, IKeyValueOptions
Fields
| Improve this Doc View SourceDefaultReadOnly
Declaration
public static readonly IncrementOptions.ReadOnly DefaultReadOnly
Field Value
Type | Description |
---|---|
IncrementOptions.ReadOnly |
Methods
| Improve this Doc View SourceAsReadOnly()
Declaration
public IncrementOptions.ReadOnly AsReadOnly()
Returns
Type | Description |
---|---|
IncrementOptions.ReadOnly |
CancellationToken(CancellationToken)
A token for cooperative cancellation of the operation between threads.
Declaration
public IncrementOptions CancellationToken(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | A CancellationToken(CancellationToken); if not supplied and internal token will handle cancellation. |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
Cas(UInt64)
The Compare And Swap or CAS value for optimistic locking.
Declaration
public IncrementOptions Cas(ulong cas)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | cas | A |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
Deconstruct(out Nullable<UInt64>, out UInt64, out ReplicateTo, out PersistTo, out DurabilityLevel, out IRetryStrategy, out IRequestSpan, out Nullable<TimeSpan>, out CancellationToken, out TimeSpan)
Declaration
public void Deconstruct(out ulong? initial, out ulong delta, out ReplicateTo replicateTo, out PersistTo persistTo, out DurabilityLevel durabilityLevel, out IRetryStrategy retryStrategy, out IRequestSpan requestSpan, out TimeSpan? timeout, out CancellationToken token, out TimeSpan expiry)
Parameters
Type | Name | Description |
---|---|---|
Nullable<UInt64> | initial | |
UInt64 | delta | |
ReplicateTo | replicateTo | |
PersistTo | persistTo | |
DurabilityLevel | durabilityLevel | |
IRetryStrategy | retryStrategy | |
IRequestSpan | requestSpan | |
Nullable<TimeSpan> | timeout | |
CancellationToken | token | |
TimeSpan | expiry |
Delta(UInt64)
The value to increment the initial value by.
Declaration
public IncrementOptions Delta(ulong delta)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | delta | The |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
Durability(DurabilityLevel)
Settings to instruct Couchbase Server to update the specified document on multiple nodes in memory and/or disk locations across the cluster before considering the write to be committed.
Declaration
public IncrementOptions Durability(DurabilityLevel durabilityLevel)
Parameters
Type | Name | Description |
---|---|---|
DurabilityLevel | durabilityLevel | The Couchbase.KeyValue.IncrementOptions.DurabilityLevel requirement for replication and persistence. |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
Durability(PersistTo, ReplicateTo)
Settings to instruct Couchbase Server to update the specified document on multiple nodes in memory and/or disk locations across the cluster before considering the write to be committed.
Declaration
public IncrementOptions Durability(PersistTo persistTo, ReplicateTo replicateTo)
Parameters
Type | Name | Description |
---|---|---|
PersistTo | persistTo | The Couchbase.KeyValue.IncrementOptions.PersistTo durability requirement for persistence. |
ReplicateTo | replicateTo | The Couchbase.KeyValue.IncrementOptions.ReplicateTo durability requirement for replication. |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
Expiry(TimeSpan)
The document's lifetime before being evicted by the server. By default the operation will never expire - must be set for a value less than 50 years.
Declaration
public IncrementOptions Expiry(TimeSpan expiry)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | The |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object. |
Initial(UInt64)
The initial value to begin incrementing.
Declaration
public IncrementOptions Initial(ulong initial)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | initial | The |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |
RequestSpan(IRequestSpan)
Inject an external span which will the be the parent span of the internal span(s).
Declaration
public IncrementOptions RequestSpan(IRequestSpan span)
Parameters
Type | Name | Description |
---|---|---|
IRequestSpan | span | An IRequestSpan |
Returns
Type | Description |
---|---|
IncrementOptions | An options instance for chaining. |
RetryStrategy(IRetryStrategy)
Inject a custom IRetryStrategy.
Declaration
public IncrementOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Type | Name | Description |
---|---|---|
IRetryStrategy | retryStrategy |
Returns
Type | Description |
---|---|
IncrementOptions | An options instance for chaining. |
Timeout(TimeSpan)
The time allowed for the operation before being terminated. This is controlled by the client; the default is 2.5s.
Declaration
public IncrementOptions Timeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | A |
Returns
Type | Description |
---|---|
IncrementOptions | A IncrementOptions object for chaining options. |