Class GetAllReplicasOptions
Optional parameters for GetAllReplicasStreamAsync(string, GetAllReplicasOptions?) and GetAllReplicasAsync(string, GetAllReplicasOptions?)
Inherited Members
Namespace: Couchbase.KeyValue
Assembly: Couchbase.NetClient.dll
Syntax
public class GetAllReplicasOptions
Constructors
View SourceGetAllReplicasOptions()
Declaration
public GetAllReplicasOptions()
Fields
View SourceDefaultReadOnly
Declaration
public static readonly GetAllReplicasOptions.ReadOnly DefaultReadOnly
Field Value
| Type | Description |
|---|---|
| GetAllReplicasOptions.ReadOnly |
Properties
View SourceDefault
Declaration
public static GetAllReplicasOptions Default { get; }
Property Value
| Type | Description |
|---|---|
| GetAllReplicasOptions |
Methods
View SourceAsReadOnly()
Declaration
public GetAllReplicasOptions.ReadOnly AsReadOnly()
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions.ReadOnly |
CancellationToken(CancellationToken)
A CancellationToken(CancellationToken) for cooperative cancellation.
Declaration
public GetAllReplicasOptions CancellationToken(CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | token |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | A GetAllReplicasOptions instance for chaining. |
Remarks
For GetAllReplicasStreamAsync(string, GetAllReplicasOptions?),
prefer to pass the token with WithCancellation on the stream. The stream sends no reads until
it is enumerated, so either token cancels the same reads. A future version will deprecate this method.
Deconstruct(out TimeSpan?, out CancellationToken, out ITypeTranscoder?, out IRetryStrategy?, out IRequestSpan?, out InternalReadPreference)
Declaration
public void Deconstruct(out TimeSpan? timeout, out CancellationToken token, out ITypeTranscoder? transcoder, out IRetryStrategy? retryStrategy, out IRequestSpan? requestSpan, out InternalReadPreference readPreference)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan? | timeout | |
| CancellationToken | token | |
| 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 GetAllReplicasOptions ReadPreference(ReadPreference readPreference)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadPreference | readPreference | The read preference. |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | This for method chaining. |
RequestSpan(IRequestSpan)
Inject an external span which will be the parent span of the internal span(s).
Declaration
public GetAllReplicasOptions RequestSpan(IRequestSpan span)
Parameters
| Type | Name | Description |
|---|---|---|
| IRequestSpan | span | An IRequestSpan |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | A GetAllReplicasOptions instance for chaining. |
RetryStrategy(IRetryStrategy)
Inject a custom IRetryStrategy.
Declaration
public GetAllReplicasOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| IRetryStrategy | retryStrategy |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | A GetAllReplicasOptions instance for chaining. |
Timeout(TimeSpan)
The time in which each read, of the active and of each replica, will timeout if it does not complete. If not set, KvTimeout is used.
Declaration
public GetAllReplicasOptions Timeout(TimeSpan timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeout |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | A GetAllReplicasOptions instance for chaining. |
Transcoder(ITypeTranscoder?)
Inject a ITypeTranscoder other than the default JsonTranscoder.
Declaration
public GetAllReplicasOptions Transcoder(ITypeTranscoder? transcoder)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeTranscoder | transcoder |
Returns
| Type | Description |
|---|---|
| GetAllReplicasOptions | A GetAllReplicasOptions instance for chaining. |