Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class InsertOptions

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

Constructors

View Source

InsertOptions()

Declaration
public InsertOptions()

Fields

View Source

DefaultReadOnly

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

Methods

View Source

AsReadOnly()

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

CancellationToken(CancellationToken)

A CancellationToken(CancellationToken) for cooperative cancellation.

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

A UpsertOptions instance for chaining.

View Source

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

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

Durability(DurabilityLevel)

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

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

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

Returns
Type Description
InsertOptions

An options instance for chaining.

View Source

Durability(PersistTo, ReplicateTo)

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

Declaration
public InsertOptions 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
InsertOptions

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 InsertOptions Expiry(TimeSpan expiry)
Parameters
Type Name Description
TimeSpan expiry

The time-to-live of the document.

Returns
Type Description
InsertOptions

An options object for chaining.

View Source

RequestSpan(IRequestSpan)

Declaration
public InsertOptions RequestSpan(IRequestSpan span)
Parameters
Type Name Description
IRequestSpan span
Returns
Type Description
InsertOptions
View Source

RetryStrategy(IRetryStrategy)

Inject a custom IRetryStrategy.

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

A InsertOptions instance for chaining.

View Source

Timeout(TimeSpan)

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

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

A InsertOptions instance for chaining.

View Source

Transcoder(ITypeTranscoder?)

Inject a ITypeTranscoder other than the default JsonTranscoder.

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

A InsertOptions instance for chaining.

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