Class LookupInAllReplicasOptions
Inherited Members
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class LookupInAllReplicasOptions
Constructors
View SourceLookupInAllReplicasOptions()
Declaration
public LookupInAllReplicasOptions()
Fields
View SourceDefaultReadOnly
Declaration
public static readonly LookupInOptions.ReadOnly DefaultReadOnly
Field Value
| Type | Description |
|---|---|
| LookupInOptions.ReadOnly |
Methods
View SourceAsReadOnly()
Declaration
public LookupInOptions.ReadOnly AsReadOnly()
Returns
| Type | Description |
|---|---|
| LookupInOptions.ReadOnly |
CancellationToken(CancellationToken)
A CancellationToken(CancellationToken) for cooperative cancellation.
Declaration
public LookupInAllReplicasOptions CancellationToken(CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | token |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | An options instance for chaining. |
Remarks
Prefer to pass the token with WithCancellation on the stream that
LookupInAllReplicasAsync(string, IEnumerable<LookupInSpec>, LookupInAllReplicasOptions?) returns. The stream sends no lookups
until it is enumerated, so either token cancels the same lookups. A future version will deprecate
this method.
Deconstruct(out TimeSpan?, out CancellationToken, out ITypeSerializer?, out ITypeTranscoder?, out IRetryStrategy?, out IRequestSpan?, out InternalReadPreference)
Declaration
public void Deconstruct(out TimeSpan? timeout, out CancellationToken token, out ITypeSerializer? serializer, out ITypeTranscoder? transcoder, out IRetryStrategy? retryStrategy, out IRequestSpan? requestSpan, out InternalReadPreference readPreference)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan? | timeout | |
| CancellationToken | token | |
| ITypeSerializer | serializer | |
| ITypeTranscoder | transcoder | |
| IRetryStrategy | retryStrategy | |
| IRequestSpan | requestSpan | |
| InternalReadPreference | readPreference |
ReadPreference(ReadPreference)
Sets whether the operation should only target Nodes in the server group specified in the ClusterOptions.
Declaration
public LookupInAllReplicasOptions ReadPreference(ReadPreference readPreference)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadPreference | readPreference | The read preference. |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | This for method chaining. |
RequestSpan(IRequestSpan)
Inject an external span which will be the parent span of the internal span(s).
Declaration
public LookupInAllReplicasOptions RequestSpan(IRequestSpan span)
Parameters
| Type | Name | Description |
|---|---|---|
| IRequestSpan | span | An IRequestSpan |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | An options instance for chaining. |
RetryStrategy(IRetryStrategy)
Inject a custom IRetryStrategy.
Declaration
public LookupInAllReplicasOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| IRetryStrategy | retryStrategy |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | An options instance for chaining. |
Serializer(ITypeSerializer?)
A custom ITypeSerializer implementation for serialization.
Declaration
public LookupInAllReplicasOptions Serializer(ITypeSerializer? serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeSerializer | serializer | A custom ITypeSerializer implementation for serialization. |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | An options instance for chaining. |
Timeout(TimeSpan?)
The time in which the operation will timeout if it does not complete.
Declaration
public LookupInAllReplicasOptions Timeout(TimeSpan? timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan? | timeout |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions | An options instance for chaining. |
Transcoder(ITypeTranscoder?)
Only used internally for full doc gets which also need the expiry. Should not be used for JSON-based LookupIn ops. Not exposed for public consumption.
Declaration
public LookupInAllReplicasOptions Transcoder(ITypeTranscoder? transcoder)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeTranscoder | transcoder |
Returns
| Type | Description |
|---|---|
| LookupInAllReplicasOptions |