Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class ReplaceOptions

Inheritance
object
ReplaceOptions
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 ReplaceOptions

Constructors

View Source

ReplaceOptions()

Declaration
public ReplaceOptions()

Fields

View Source

DefaultReadOnly

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

Methods

View Source

AsReadOnly()

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

CancellationToken(CancellationToken)

A CancellationToken(CancellationToken) for cooperative cancellation.

Declaration
public ReplaceOptions CancellationToken(CancellationToken token)
Parameters
Type Name Description
CancellationToken token
Returns
Type Description
ReplaceOptions

An options instance for chaining.

View Source

Cas(ulong)

Compare and Set value for optimistic locking of a document.

Declaration
public ReplaceOptions Cas(ulong cas)
Parameters
Type Name Description
ulong cas

A ulong value returned by the server in a previous operation.

Returns
Type Description
ReplaceOptions

An options object for chaining.

View Source

Deconstruct(out TimeSpan, out ulong, out ReplicateTo, out PersistTo, out DurabilityLevel, out TimeSpan?, out CancellationToken, out ITypeTranscoder?, out IRetryStrategy?, out IRequestSpan?, out bool)

Declaration
public void Deconstruct(out TimeSpan expiry, out ulong cas, out ReplicateTo replicateTo, out PersistTo persistTo, out DurabilityLevel durabilityLevel, out TimeSpan? timeout, out CancellationToken token, out ITypeTranscoder? transcoder, out IRetryStrategy? retryStrategyValue, out IRequestSpan? requestSpan, out bool preserveTtl)
Parameters
Type Name Description
TimeSpan expiry
ulong cas
ReplicateTo replicateTo
PersistTo persistTo
DurabilityLevel durabilityLevel
TimeSpan? timeout
CancellationToken token
ITypeTranscoder transcoder
IRetryStrategy retryStrategyValue
IRequestSpan requestSpan
bool preserveTtl
View Source

Durability(DurabilityLevel)

The durability level required for persisting a JSON document across the cluster.

Declaration
public ReplaceOptions Durability(DurabilityLevel durabilityLevel)
Parameters
Type Name Description
DurabilityLevel durabilityLevel

The Couchbase.KeyValue.ReplaceOptions.DurabilityLevel required for persistance.

Returns
Type Description
ReplaceOptions

An options instance for chaining.

View Source

Durability(PersistTo, ReplicateTo)

The durability level required for persisting a JSON document across the cluster.

Declaration
public ReplaceOptions Durability(PersistTo persistTo, ReplicateTo replicateTo)
Parameters
Type Name Description
PersistTo persistTo

The durability requirement for persistence.

ReplicateTo replicateTo

The durability requirement for replication.

Returns
Type Description
ReplaceOptions

An options instance for chaining.

View Source

Expiry(TimeSpan)

Sets the expiration for a document. By default, documents never expire - if overridden the value must be less than 50 years.

Declaration
public ReplaceOptions Expiry(TimeSpan expiry)
Parameters
Type Name Description
TimeSpan expiry

The time-to-live of the document.

Returns
Type Description
ReplaceOptions

An options object for chaining.

View Source

PreserveTtl(bool)

Specifies whether an existing document's expiry should be preserved. If true, and the document exists, its expiry will not be modified.Otherwise the document's expiry is determined by Expiry(TimeSpan).

Declaration
public ReplaceOptions PreserveTtl(bool preserveTtl)
Parameters
Type Name Description
bool preserveTtl
Returns
Type Description
ReplaceOptions

An options object for chaining.

Remarks

The default is false.

View Source

RequestSpan(IRequestSpan)

Inject an external span which will be the parent span of the internal span(s).

Declaration
public ReplaceOptions RequestSpan(IRequestSpan span)
Parameters
Type Name Description
IRequestSpan span

An IRequestSpan

Returns
Type Description
ReplaceOptions

A ExistsOptions instance for chaining.

View Source

RetryStrategy(IRetryStrategy)

Inject a custom IRetryStrategy.

Declaration
public ReplaceOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Type Name Description
IRetryStrategy retryStrategy
Returns
Type Description
ReplaceOptions

An options instance for chaining.

View Source

Timeout(TimeSpan)

The time in which the operation will timeout if it does not complete.

Declaration
public ReplaceOptions Timeout(TimeSpan timeout)
Parameters
Type Name Description
TimeSpan timeout
Returns
Type Description
ReplaceOptions

An options instance for chaining.

View Source

Transcoder(ITypeTranscoder?)

Inject a ITypeTranscoder other than the default JsonTranscoder.

Declaration
public ReplaceOptions Transcoder(ITypeTranscoder? transcoder)
Parameters
Type Name Description
ITypeTranscoder transcoder
Returns
Type Description
ReplaceOptions

An options instance for chaining.

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