Couchbase .NET SDK | 3.3.5
Search Results for

    Show / Hide Table of Contents

    Class ClusterOptions

    Options controlling the connection to the Couchbase cluster.

    Inheritance
    Object
    ClusterOptions
    Namespace: Couchbase
    Assembly: Couchbase.NetClient.dll
    Syntax
    public sealed class ClusterOptions : object

    Properties

    | Improve this Doc View Source

    AnalyticsTimeout

    The time to wait before timing out an Analytics request by the client.

    Declaration
    public TimeSpan AnalyticsTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 75s.

    | Improve this Doc View Source

    BootstrapHttpPort

    Port used for HTTP bootstrapping fallback if other bootstrap methods are not available. Do not change unless the Cochbase server default ports have be changed.

    Declaration
    public int BootstrapHttpPort { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    The default is 8091.

    | Improve this Doc View Source

    BootstrapHttpPortTls

    Port used for TLS HTTP bootstrapping fallback if other bootstrap methods are not available. Do not change unless the Cochbase server default ports have be changed.

    Declaration
    public int BootstrapHttpPortTls { get; set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    BootstrapPollInterval

    Used for checking that the SDK has bootstrapped and potentially retrying if not.

    Declaration
    public TimeSpan BootstrapPollInterval { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 2.5s.

    | Improve this Doc View Source

    Buckets

    The buckets to be used in the cluster.

    Declaration
    public IList<string> Buckets { get; set; }
    Property Value
    Type Description
    IList<String>
    | Improve this Doc View Source

    CircuitBreakerConfiguration

    The configuration for tuning the circuit breaker; if the default is changed ensure that the change is properly measured and tested.

    Declaration
    public CircuitBreakerConfiguration CircuitBreakerConfiguration { get; set; }
    Property Value
    Type Description
    CircuitBreakerConfiguration
    | Improve this Doc View Source

    Compression

    Enables compression for key/value operations.

    Declaration
    public bool Compression { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The value is ignored if no compression algorithm is supplied via WithCompressionAlgorithm(ICompressionAlgorithm). Defaults to true.

    | Improve this Doc View Source

    CompressionMinRatio

    If compression is enabled, the minimum compression ratio to accept when sending documents to the server. Documents which don't achieve this compression ratio are sent to the server uncompressed.

    Declaration
    public float CompressionMinRatio { get; set; }
    Property Value
    Type Description
    Single
    Remarks

    1.0 means no compression was achieved. A value of 0.75 would result in documents which compress to at least 75% of their original size to be transmitted compressed. The default is 0.83 (83%).

    | Improve this Doc View Source

    CompressionMinSize

    If compression is enabled, the minimum document size considered for compression (in bytes). Documents smaller than this size are always sent to the server uncompressed.

    Declaration
    public int CompressionMinSize { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    The default is 32.

    | Improve this Doc View Source

    ConfigIdleRedialTimeout

    Not currently used.

    Declaration
    public TimeSpan ConfigIdleRedialTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    ConfigPollFloorInterval

    Not currently used.

    Declaration
    public TimeSpan ConfigPollFloorInterval { get; set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    ConfigPollInterval

    The time between querying the server for new cluster map revisions.

    Declaration
    public TimeSpan ConfigPollInterval { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 2.5s.

    | Improve this Doc View Source

    ConnectionString

    The connection string for the cluster.

    Declaration
    public string? ConnectionString { get; set; }
    Property Value
    Type Description
    Nullable<String>
    | Improve this Doc View Source

    Default

    Provides a default implementation of ClusterOptions.

    Declaration
    public static ClusterOptions Default { get; }
    Property Value
    Type Description
    ClusterOptions
    | Improve this Doc View Source

    DnsResolver

    Provide a custom IDnsResolver for DNS SRV resolution.

    Declaration
    public IDnsResolver DnsResolver { get; set; }
    Property Value
    Type Description
    IDnsResolver
    | Improve this Doc View Source

    EnableCertificateAuthentication

    Declaration
    public bool EnableCertificateAuthentication { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    EnableCertificateRevocation

    A value that specifies whether the certificate revocation list is checked during authentication.

    Declaration
    public bool EnableCertificateRevocation { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    EnableConfigPolling

    Polls the server for cluster map configuration revision changes. This should always be enabled unless debugging the SDK.

    Declaration
    public bool EnableConfigPolling { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This is enabled by default.

    | Improve this Doc View Source

    EnableDnsSrvResolution

    When bootstrapping, checks first that the connection string is a DNS SRV lookup; this can cause slower bootstrap times if not needed and can be disabled if DNS SRV is not being used.

    Declaration
    public bool EnableDnsSrvResolution { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This is enabled by default.

    | Improve this Doc View Source

    EnabledSslProtocols

    Enabled SSL Protocols

    Declaration
    public SslProtocols EnabledSslProtocols { get; set; }
    Property Value
    Type Description
    SslProtocols
    Remarks

    The defaults are Tls, Tls1 nd Tls3

    | Improve this Doc View Source

    EnableExpect100Continue

    Declaration
    public bool EnableExpect100Continue { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    EnableMutationTokens

    Enables mutation tokens for read consistency in Query searches.

    Declaration
    public bool EnableMutationTokens { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    They are enabled by default.

    | Improve this Doc View Source

    EnableOperationDurationTracing

    If true the server duration for an operation will be enabled and the value collected per K/V operation.

    Declaration
    public bool EnableOperationDurationTracing { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The default is enabled.

    | Improve this Doc View Source

    EnableTcpKeepAlives

    Enables TCP Keep Alives.

    Declaration
    public bool EnableTcpKeepAlives { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This is enabled by default.

    | Improve this Doc View Source

    EnableTls

    Overrides the TLS behavior in ConnectionString, enabling or disabling TLS.

    Declaration
    public bool? EnableTls { get; set; }
    Property Value
    Type Description
    Nullable<Boolean>
    Remarks

    Disabled default.

    | Improve this Doc View Source

    Experiments

    Settings to enable various experiments. These experiments may improve performance, but also may have stability issues. If successful, they will become the standard approach.

    Declaration
    public ExperimentalOptions Experiments { get; set; }
    Property Value
    Type Description
    ExperimentalOptions
    | Improve this Doc View Source

    ForceIpAsTargetHost

    If ForceIpAsTargetHost is true, send the IP as the target host during TLS authentication. If ForceIpAsTargetHost is false, then mimic the default SDK2 behavior; the hostname or IP as defined by the server will be sent as the target host during TLS authentication.

    Declaration
    public bool ForceIpAsTargetHost { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Only applies when EnableTls is true.

    | Improve this Doc View Source

    ForceIPv4

    Forces the SDK use IPv4 over IPv6

    Declaration
    public bool ForceIPv4 { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Defaults to disabled.

    | Improve this Doc View Source

    HttpCertificateCallbackValidation

    The default RemoteCertificateValidationCallback called by .NET to validate the TLS/SSL certificates being used for HTTP services (Query, FTS, Analytics, etc). To ignore RemoteCertificateNameMismatch and RemoteCertificateChainErrors errors caused when the subject and subject alternative name do not match the requesting DNS name, set ClusterOptions.HttpIgnoreRemoteCertificateMismatch to true.

    Declaration
    public RemoteCertificateValidationCallback? HttpCertificateCallbackValidation { get; set; }
    Property Value
    Type Description
    Nullable<RemoteCertificateValidationCallback>
    | Improve this Doc View Source

    HttpConnectionLifetime

    Gets or sets how long a connection can be in the pool to be considered reusable.

    Declaration
    public TimeSpan HttpConnectionLifetime { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    Default of zero equates to the SocketsHttpHandler's default of -1 for infinite.

    | Improve this Doc View Source

    HttpIgnoreRemoteCertificateMismatch

    Ignore CertificateNameMismatch and CertificateChainMismatch for HTTP services (Query, FTS, Analytics, etc), since they happen together.

    Declaration
    public bool HttpIgnoreRemoteCertificateMismatch { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Intended for development purposes only. Has no effect if HttpCertificateCallbackValidation is set.

    | Improve this Doc View Source

    IdleHttpConnectionTimeout

    The maximum time an HTTP connection will remain idle before being considered reusable.

    Declaration
    public TimeSpan IdleHttpConnectionTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 4.5s.

    | Improve this Doc View Source

    IdleKvConnectionTimeout

    Amount of time with no activity before a key/value connection is considered idle.

    Declaration
    public TimeSpan IdleKvConnectionTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 1m.

    | Improve this Doc View Source

    IgnoreRemoteCertificateNameMismatch

    Ignore CertificateNameMismatch and CertificateChainMismatch, since they happen together.

    Declaration
    public bool IgnoreRemoteCertificateNameMismatch { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    KvCertificateCallbackValidation

    The default RemoteCertificateValidationCallback called by .NET to validate the TLS/SSL certificates being used for Key/Value operations. To ignore RemoteCertificateNameMismatch and RemoteCertificateChainErrors errors caused when the subject and subject alternative name do not match the requesting DNS name, set ClusterOptions.KvIgnoreRemoteCertificateNameMismatch to true.

    Declaration
    public RemoteCertificateValidationCallback? KvCertificateCallbackValidation { get; set; }
    Property Value
    Type Description
    Nullable<RemoteCertificateValidationCallback>
    | Improve this Doc View Source

    KvConnectTimeout

    The time to wait while attempting to connect to a node’s KV service via a socket. Initial connection, reconnecting, node added, etc.

    Declaration
    public TimeSpan KvConnectTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 10s.

    | Improve this Doc View Source

    KvDurabilityTimeout

    The time to wait before timing out a KV operation that is either using synchronous durability or observe-based durability.

    Declaration
    public TimeSpan KvDurabilityTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 10s.

    | Improve this Doc View Source

    KvIgnoreRemoteCertificateNameMismatch

    Ignore CertificateNameMismatch and CertificateChainMismatch for Key/Value operations, since they happen together.

    Declaration
    public bool KvIgnoreRemoteCertificateNameMismatch { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Intended for development purposes only. Has no effect if KvCertificateCallbackValidation is set.

    | Improve this Doc View Source

    KvSendQueueCapacity

    Gets or sets the maximum number of operations that will be queued for processing per node. If this value is exceeded, any additional operations will be put into the retry loop.

    Declaration
    public uint KvSendQueueCapacity { get; set; }
    Property Value
    Type Description
    UInt32
    Remarks

    Defaults to 1024 operations.

    | Improve this Doc View Source

    KvTimeout

    The time to wait before timing out a KV operation by the client.

    Declaration
    public TimeSpan KvTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 2.5s.

    | Improve this Doc View Source

    Logging

    The to use for logging.

    Declaration
    public ILoggerFactory? Logging { get; set; }
    Property Value
    Type Description
    Nullable<ILoggerFactory>
    | Improve this Doc View Source

    LoggingMeterOptions

    Configures logging for measuring latencies of the various Couchbase Services.

    Declaration
    public LoggingMeterOptions LoggingMeterOptions { get; set; }
    Property Value
    Type Description
    LoggingMeterOptions
    Remarks

    The default is enabled using the LoggingMeter class.

    | Improve this Doc View Source

    ManagementTimeout

    Number of seconds to wait before timing out a Management API request by the client.

    Declaration
    public TimeSpan ManagementTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 75s.

    | Improve this Doc View Source

    MaxHttpConnections

    Gets or sets the maximum number of simultaneous TCP connections allowed to a single server.

    Declaration
    public int MaxHttpConnections { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    The default is 0 which equates to the maximum value or Int32.Max.

    | Improve this Doc View Source

    MaxKvConnections

    Maximum number of connections per key/value node.

    Declaration
    public int MaxKvConnections { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    The default is 5; use the smallest number possible for best performance. A higher number of socket connections will increase the amount resources used by the server and harm performance.

    | Improve this Doc View Source

    NetworkResolution

    Specifies the network resolution strategy to use for alternative network; used in some container environments where there maybe internal and external addresses for connecting.

    Declaration
    public string NetworkResolution { get; set; }
    Property Value
    Type Description
    String
    Remarks

    The derault is "Auto"; Alternative addresses will be used if available.

    | Improve this Doc View Source

    NumKvConnections

    Minimum number of connections per key/value node.

    Declaration
    public int NumKvConnections { get; set; }
    Property Value
    Type Description
    Int32
    Remarks

    The default is 2; use the smallest number possible for best performance.

    | Improve this Doc View Source

    OrphanTracingOptions

    Configures orphan logging for the SDK. Requires that TracingOptions is enabled (the default).

    Declaration
    public OrphanOptions OrphanTracingOptions { get; set; }
    Property Value
    Type Description
    OrphanOptions
    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.OrphanResponseReporting.OrphanTraceListener class is used.

    | Improve this Doc View Source

    Password

    Declaration
    public string? Password { get; set; }
    Property Value
    Type Description
    Nullable<String>
    | Improve this Doc View Source

    QueryTimeout

    The time to wait before timing out a Query or N1QL request by the client.

    Declaration
    public TimeSpan QueryTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 75s.

    | Improve this Doc View Source

    RedactionLevel

    The redaction level for log files.

    Declaration
    public RedactionLevel RedactionLevel { get; set; }
    Property Value
    Type Description
    RedactionLevel
    Remarks

    The default is None

    | Improve this Doc View Source

    RetryStrategy

    The IRetryStrategy for operation retries. Applies to all services: K/V, Query, etc.

    Declaration
    public IRetryStrategy RetryStrategy { get; set; }
    Property Value
    Type Description
    IRetryStrategy
    | Improve this Doc View Source

    SearchTimeout

    Number of seconds to wait before timing out a Search request by the client.

    Declaration
    public TimeSpan SearchTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 75s.

    | Improve this Doc View Source

    Serializer

    Provide a custom ITypeSerializer.

    Declaration
    public ITypeSerializer Serializer { get; set; }
    Property Value
    Type Description
    ITypeSerializer
    | Improve this Doc View Source

    TcpKeepAliveInterval

    The duration between two successive keepalive retransmissions, if acknowledgement to the previous keepalive transmission is not received.

    Declaration
    public TimeSpan TcpKeepAliveInterval { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is every 1s.

    | Improve this Doc View Source

    TcpKeepAliveTime

    The duration between two keepalive transmissions in idle condition.

    Declaration
    public TimeSpan TcpKeepAliveTime { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is every 1m.

    | Improve this Doc View Source

    ThresholdOptions

    Configures threshold logging for the SDK.

    Declaration
    public ThresholdOptions ThresholdOptions { get; set; }
    Property Value
    Type Description
    ThresholdOptions
    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.ThresholdTracing.ThresholdTraceListener class is used.

    | Improve this Doc View Source

    TracingOptions

    Enables request tracing within the SDK. The default is enabled and the Couchbase.Core.Diagnostics.Tracing.RequestTracer is configured.

    Declaration
    public TracingOptions TracingOptions { get; set; }
    Property Value
    Type Description
    TracingOptions
    | Improve this Doc View Source

    Transcoder

    Provide a custom ITypeTranscoder.

    Declaration
    public ITypeTranscoder Transcoder { get; set; }
    Property Value
    Type Description
    ITypeTranscoder
    | Improve this Doc View Source

    Tuning

    Options for performance tuning specific to the .NET SDK.

    Declaration
    public TuningOptions Tuning { get; set; }
    Property Value
    Type Description
    TuningOptions
    | Improve this Doc View Source

    UnorderedExecutionEnabled

    Allows unordered execution of commands by the server.

    Declaration
    public bool UnorderedExecutionEnabled { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The default is enabled.

    | Improve this Doc View Source

    UserName

    Declaration
    public string? UserName { get; set; }
    Property Value
    Type Description
    Nullable<String>
    | Improve this Doc View Source

    ViewTimeout

    The time to wait before timing out a View request by the client.

    Declaration
    public TimeSpan ViewTimeout { get; set; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    The default is 75s.

    | Improve this Doc View Source

    X509CertificateFactory

    Gets or sets the ICertificateFactory to provide client certificates during TLS authentication.

    Declaration
    public ICertificateFactory X509CertificateFactory { get; set; }
    Property Value
    Type Description
    ICertificateFactory

    Methods

    | Improve this Doc View Source

    AddService<TService, TImplementation>(ClusterServiceLifetime)

    Register a service with the cluster's ClusterServices.

    Declaration
    public ClusterOptions AddService<TService, TImplementation>(ClusterServiceLifetime lifetime)
        where TImplementation : TService
    Parameters
    Type Name Description
    ClusterServiceLifetime lifetime

    Lifetime of the service.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Improve this Doc View Source

    AddService<TService, TImplementation>(Func<IServiceProvider, TImplementation>, ClusterServiceLifetime)

    Register a service with the cluster's ClusterServices.

    Declaration
    public ClusterOptions AddService<TService, TImplementation>(Func<IServiceProvider, TImplementation> factory, ClusterServiceLifetime lifetime)
        where TImplementation : TService
    Parameters
    Type Name Description
    Func<IServiceProvider, TImplementation> factory

    Factory which will create the service.

    ClusterServiceLifetime lifetime

    Lifetime of the service.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Improve this Doc View Source

    WithBuckets(String[])

    Set the buckets to be used in the cluster.

    Declaration
    public ClusterOptions WithBuckets(params string[] bucketNames)
    Parameters
    Type Name Description
    String[] bucketNames

    The names of the buckets.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithCompressionAlgorithm(ICompressionAlgorithm)

    Provide a custom ICompressionAlgorithm for key/value body compression.

    Declaration
    public ClusterOptions WithCompressionAlgorithm(ICompressionAlgorithm compressionAlgorithm)
    Parameters
    Type Name Description
    ICompressionAlgorithm compressionAlgorithm

    Compression algorithm to use.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithCompressionAlgorithm<TImplementation>()

    Provide a custom ICompressionAlgorithm for key/value body compression.

    Declaration
    public ClusterOptions WithCompressionAlgorithm<TImplementation>()
        where TImplementation : class, ICompressionAlgorithm
    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    Type Parameters
    Name Description
    TImplementation

    Compression algorithm to use.

    | Improve this Doc View Source

    WithConnectionString(String)

    Set the connection string for the cluster.

    Declaration
    public ClusterOptions WithConnectionString(string connectionString)
    Parameters
    Type Name Description
    String connectionString

    The connection string.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithCredentials(String, String)

    Set credentials used for authentication.

    Declaration
    public ClusterOptions WithCredentials(string username, string password)
    Parameters
    Type Name Description
    String username

    The username.

    String password

    The password.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithDnsResolver(IDnsResolver)

    Provide a custom IDnsResolver for DNS SRV resolution.

    Declaration
    public ClusterOptions WithDnsResolver(IDnsResolver dnsResolver)
    Parameters
    Type Name Description
    IDnsResolver dnsResolver

    DNS resolver to use.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithLogging(Nullable<ILoggerFactory>)

    Set the to use for logging.

    Declaration
    public ClusterOptions WithLogging(ILoggerFactory? loggerFactory = null)
    Parameters
    Type Name Description
    Nullable<ILoggerFactory> loggerFactory

    The logger factory.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithLoggingMeterOptions(Action<LoggingMeterOptions>)

    Configures logging for measuring latencies of the various Couchbase Services.

    Declaration
    public ClusterOptions WithLoggingMeterOptions(Action<LoggingMeterOptions> configure)
    Parameters
    Type Name Description
    Action<LoggingMeterOptions> configure

    An LoggingMeterOptions lambda for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled using the LoggingMeter class.

    | Improve this Doc View Source

    WithLoggingMeterOptions(LoggingMeterOptions)

    Configures logging for measuring latencies of the various Couchbase Services.

    Declaration
    public ClusterOptions WithLoggingMeterOptions(LoggingMeterOptions options)
    Parameters
    Type Name Description
    LoggingMeterOptions options

    An LoggingMeterOptions object for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled using the LoggingMeter class.

    | Improve this Doc View Source

    WithOrphanTracing(Action<OrphanOptions>)

    Configures orphan logging for the SDK. Requires that TracingOptions is enabled (the default).

    Declaration
    public ClusterOptions WithOrphanTracing(Action<OrphanOptions> configure)
    Parameters
    Type Name Description
    Action<OrphanOptions> configure

    The OrphanOptions lambda for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.OrphanResponseReporting.OrphanTraceListener class is used.

    | Improve this Doc View Source

    WithOrphanTracing(OrphanOptions)

    Configures orphan logging for the SDK. Requires that TracingOptions is enabled (the default).

    Declaration
    public ClusterOptions WithOrphanTracing(OrphanOptions options)
    Parameters
    Type Name Description
    OrphanOptions options

    The OrphanOptions object for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.OrphanResponseReporting.OrphanTraceListener class is used.

    | Improve this Doc View Source

    WithRetryStrategy(IRetryStrategy)

    The IRetryStrategy for operation retries. Applies to all services: K/V, Query, etc.

    Declaration
    public ClusterOptions WithRetryStrategy(IRetryStrategy retryStrategy)
    Parameters
    Type Name Description
    IRetryStrategy retryStrategy

    The custom RetryStrategy.

    Returns
    Type Description
    ClusterOptions
    | Improve this Doc View Source

    WithSerializer(ITypeSerializer)

    Provide a custom ITypeSerializer.

    Declaration
    public ClusterOptions WithSerializer(ITypeSerializer serializer)
    Parameters
    Type Name Description
    ITypeSerializer serializer

    Serializer to use.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithThresholdTracing(Action<ThresholdOptions>)

    Configures request tracing for the SDK.

    Declaration
    public ClusterOptions WithThresholdTracing(Action<ThresholdOptions> configure)
    Parameters
    Type Name Description
    Action<ThresholdOptions> configure

    The lambda to be configured.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.ThresholdTracing.ThresholdTraceListener class is used.

    | Improve this Doc View Source

    WithThresholdTracing(ThresholdOptions)

    Configures threshold logging for the SDK.

    Declaration
    public ClusterOptions WithThresholdTracing(ThresholdOptions options)
    Parameters
    Type Name Description
    ThresholdOptions options

    The ThresholdOptions for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    Remarks

    The default is enabled and Couchbase.Core.Diagnostics.Tracing.ThresholdTracing.ThresholdTraceListener class is used.

    | Improve this Doc View Source

    WithTracing(Action<TracingOptions>)

    Enables request tracing within the SDK. The default is enabled and the Couchbase.Core.Diagnostics.Tracing.RequestTracer is configured.

    Declaration
    public ClusterOptions WithTracing(Action<TracingOptions> configure)
    Parameters
    Type Name Description
    Action<TracingOptions> configure

    A TracingOptions lambda for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    | Improve this Doc View Source

    WithTracing(TracingOptions)

    Enables request tracing within the SDK. The default is enabled and the Couchbase.Core.Diagnostics.Tracing.RequestTracer is configured.

    Declaration
    public ClusterOptions WithTracing(TracingOptions options)
    Parameters
    Type Name Description
    TracingOptions options

    A TracingOptions object for configuration.

    Returns
    Type Description
    ClusterOptions

    A ClusterOptions object for chaining.

    | Improve this Doc View Source

    WithTranscoder(ITypeTranscoder)

    Provide a custom ITypeTranscoder.

    Declaration
    public ClusterOptions WithTranscoder(ITypeTranscoder transcoder)
    Parameters
    Type Name Description
    ITypeTranscoder transcoder

    Transcoder to use.

    Returns
    Type Description
    ClusterOptions

    A reference to this ClusterOptions object for method chaining.

    | Improve this Doc View Source

    WithX509CertificateFactory(ICertificateFactory)

    Use the given ICertificateFactory to provide client certificates during TLS authentication.

    Declaration
    public ClusterOptions WithX509CertificateFactory(ICertificateFactory certificateFactory)
    Parameters
    Type Name Description
    ICertificateFactory certificateFactory

    The certificate factory to use.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions to continue configuration in a fluent style.

    Extension Methods

    ClusterOptionsExtensions.AddTransientService<TService, TImplementation>(ClusterOptions)
    ClusterOptionsExtensions.AddTransientService<TService, TImplementation>(ClusterOptions, Func<IServiceProvider, TImplementation>)
    ClusterOptionsExtensions.AddClusterService<T>(ClusterOptions, T)
    ClusterOptionsExtensions.AddClusterService<TService, TImplementation>(ClusterOptions, TImplementation)
    ClusterOptionsExtensions.AddClusterService<TService, TImplementation>(ClusterOptions)
    ClusterOptionsExtensions.AddClusterService<TService, TImplementation>(ClusterOptions, Func<IServiceProvider, TImplementation>)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2022 Couchbase, Inc.