Class MutateInOptions
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class MutateInOptions : object, ITranscoderOverrideOptions, ITimeoutOptions, IKeyValueOptions
Fields
| Improve this Doc View SourceDefaultReadOnly
Declaration
public static readonly MutateInOptions.ReadOnly DefaultReadOnly
Field Value
Type | Description |
---|---|
MutateInOptions.ReadOnly |
Methods
| Improve this Doc View SourceAccessDeleted(Boolean)
Allows access to a deleted document's attributes section. Only for internal diagnostic use only and is an unsupported feature.
Declaration
public MutateInOptions AccessDeleted(bool accessDeleted)
Parameters
Type | Name | Description |
---|---|---|
Boolean | accessDeleted |
Returns
Type | Description |
---|---|
MutateInOptions |
AsReadOnly()
Declaration
public MutateInOptions.ReadOnly AsReadOnly()
Returns
Type | Description |
---|---|
MutateInOptions.ReadOnly |
CancellationToken(CancellationToken)
A CancellationToken(CancellationToken) for cooperative cancellation.
Declaration
public MutateInOptions CancellationToken(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Cas(UInt64)
Compare and Set value for optimistic locking of a document.
Declaration
public MutateInOptions Cas(ulong cas)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | cas | A |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
CreateAsDeleted(Boolean)
Declaration
public MutateInOptions CreateAsDeleted(bool createAsDeleted)
Parameters
Type | Name | Description |
---|---|---|
Boolean | createAsDeleted |
Returns
Type | Description |
---|---|
MutateInOptions |
Deconstruct(out TimeSpan, out StoreSemantics, out UInt64, out (PersistTo, ReplicateTo), out DurabilityLevel, out Nullable<TimeSpan>, out CancellationToken, out ITypeSerializer, out Boolean, out Boolean, out IRetryStrategy, out IRequestSpan, out Boolean, out ITypeTranscoder)
Declaration
public void Deconstruct(out TimeSpan expiry, out StoreSemantics storeSemantics, out ulong cas, out (PersistTo, ReplicateTo) durability, out DurabilityLevel durabilityLevel, out TimeSpan? timeout, out CancellationToken token, out ITypeSerializer serializer, out bool createAsDeleted, out bool accessDeleted, out IRetryStrategy retryStrategy, out IRequestSpan requestSpan, out bool preserveTtl, out ITypeTranscoder transcoder)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | |
StoreSemantics | storeSemantics | |
UInt64 | cas | |
(, )<PersistTo, ReplicateTo> | durability | |
DurabilityLevel | durabilityLevel | |
Nullable<TimeSpan> | timeout | |
CancellationToken | token | |
ITypeSerializer | serializer | |
Boolean | createAsDeleted | |
Boolean | accessDeleted | |
IRetryStrategy | retryStrategy | |
IRequestSpan | requestSpan | |
Boolean | preserveTtl | |
ITypeTranscoder | transcoder |
Durability(DurabilityLevel)
The durability level required for persisting a JSON document across the cluster.
Declaration
public MutateInOptions Durability(DurabilityLevel durabilityLevel)
Parameters
Type | Name | Description |
---|---|---|
DurabilityLevel | durabilityLevel | The Couchbase.KeyValue.MutateInOptions.DurabilityLevel required for persistance. |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Durability(PersistTo, ReplicateTo)
The durability level required for persisting a JSON document across the cluster.
Declaration
public MutateInOptions 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 |
---|---|
MutateInOptions | An options instance for chaining. |
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 MutateInOptions Expiry(TimeSpan expiry)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | expiry | The time-to-live of the document. |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
PreserveTtl(Boolean)
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 MutateInOptions PreserveTtl(bool preserveTtl)
Parameters
Type | Name | Description |
---|---|---|
Boolean | preserveTtl |
Returns
Type | Description |
---|---|
MutateInOptions | An options object for chaining. |
Remarks
The default is false.
RequestSpan(IRequestSpan)
Inject an external span which will the be the parent span of the internal span(s).
Declaration
public MutateInOptions RequestSpan(IRequestSpan span)
Parameters
Type | Name | Description |
---|---|---|
IRequestSpan | span | An IRequestSpan |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
RetryStrategy(IRetryStrategy)
Inject a custom IRetryStrategy.
Declaration
public MutateInOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Type | Name | Description |
---|---|---|
IRetryStrategy | retryStrategy |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Serializer(ITypeSerializer)
A custom ITypeSerializer implementation for serialization.
Declaration
public MutateInOptions Serializer(ITypeSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
ITypeSerializer | serializer | A custom ITypeSerializer implementation for serialization. |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
StoreSemantics(StoreSemantics)
StoreSemantics - the storage action Replace - replace the document, fail if it doesn't exist Upsert - replace the document or create it if it doesn't exist (0x01) Insert - create document, fail if it exists(0x02)
Declaration
public MutateInOptions StoreSemantics(StoreSemantics storeSemantics)
Parameters
Type | Name | Description |
---|---|---|
StoreSemantics | storeSemantics |
Returns
Type | Description |
---|---|
MutateInOptions |
Timeout(TimeSpan)
The time in which the operation will timeout if it does not complete.
Declaration
public MutateInOptions Timeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |
Transcoder(ITypeTranscoder)
Inject a ITypeTranscoder other than the default JsonTranscoder.
Declaration
public MutateInOptions Transcoder(ITypeTranscoder transcoder)
Parameters
Type | Name | Description |
---|---|---|
ITypeTranscoder | transcoder |
Returns
Type | Description |
---|---|
MutateInOptions | An options instance for chaining. |