Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class IncrementOptions

Inheritance
object
IncrementOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class IncrementOptions

Constructors

View Source

IncrementOptions()

Declaration
public IncrementOptions()

Fields

View Source

DefaultReadOnly

Declaration
public static readonly IncrementOptions.ReadOnly DefaultReadOnly
Field Value
Type Description
IncrementOptions.ReadOnly

Methods

View Source

AsReadOnly()

Declaration
public IncrementOptions.ReadOnly AsReadOnly()
Returns
Type Description
IncrementOptions.ReadOnly
View Source

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.

View Source

Cas(ulong)

The Compare And Swap or CAS value for optimistic locking.

Declaration
[Obsolete("CAS is not supported by the server for the Increment operation.")]
public IncrementOptions Cas(ulong cas)
Parameters
Type Name Description
ulong cas

A ulong value generated by the server by a previous operation.

Returns
Type Description
IncrementOptions

A IncrementOptions object for chaining options.

View Source

Deconstruct(out ulong?, out ulong, out ReplicateTo, out PersistTo, out DurabilityLevel, out IRetryStrategy?, out IRequestSpan?, out 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
ulong? initial
ulong delta
ReplicateTo replicateTo
PersistTo persistTo
DurabilityLevel durabilityLevel
IRetryStrategy retryStrategy
IRequestSpan requestSpan
TimeSpan? timeout
CancellationToken token
TimeSpan expiry
View Source

Delta(ulong)

The value to increment the initial value by.

Declaration
public IncrementOptions Delta(ulong delta)
Parameters
Type Name Description
ulong delta

The ulong value to increment the initial value by.

Returns
Type Description
IncrementOptions

A IncrementOptions object for chaining options.

View Source

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.

View Source

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.

View Source

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 TimeSpan value for expiration

Returns
Type Description
IncrementOptions

A IncrementOptions object.

View Source

Initial(ulong)

The initial value to begin incrementing.

Declaration
public IncrementOptions Initial(ulong initial)
Parameters
Type Name Description
ulong initial

The ulong value for the initial increment.

Returns
Type Description
IncrementOptions

A IncrementOptions object for chaining options.

View Source

RequestSpan(IRequestSpan)

Inject an external span which will 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.

View Source

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.

View Source

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 TimeSpan indicating the amount of time before the operations times out.

Returns
Type Description
IncrementOptions

A IncrementOptions object for chaining options.

  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.