Couchbase Transactions .NET | 1.1.0
Search Results for

    Show / Hide Table of Contents

    Class TransactionConfigBuilder

    A class for configuring transactions options.

    Inheritance
    Object
    TransactionConfigBuilder
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Couchbase.Transactions.Config
    Assembly: Couchbase.Transactions.dll
    Syntax
    public class TransactionConfigBuilder

    Methods

    | Improve this Doc View Source

    Build()

    Generate a TransactionConfig from the values provided.

    Declaration
    public TransactionConfig Build()
    Returns
    Type Description
    TransactionConfig

    A TransactionConfig that has been initialized with the given values.

    | Improve this Doc View Source

    CleanupClientAttempts(Boolean)

    Controls where any transaction attempts made by this client are automatically removed.

    Declaration
    public TransactionConfigBuilder CleanupClientAttempts(bool cleanupClientAttempts)
    Parameters
    Type Name Description
    Boolean cleanupClientAttempts

    Whether to cleanup attempts made by this client.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    CleanupLostAttempts(Boolean)

    Controls where a background process is created to cleanup any 'lost' transaction attempts.

    Declaration
    public TransactionConfigBuilder CleanupLostAttempts(bool cleanupLostAttempts)
    Parameters
    Type Name Description
    Boolean cleanupLostAttempts

    Whether to cleanup lost attempts from other clients.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    CleanupWindow(TimeSpan)

    Each client that has cleanupLostAttempts(true) enabled, will be participating in the distributed cleanup process. This involves checking all ATRs every cleanup window, and this parameter controls the length of that window.

    Declaration
    public TransactionConfigBuilder CleanupWindow(TimeSpan cleanupWindow)
    Parameters
    Type Name Description
    TimeSpan cleanupWindow

    The length of the cleanup window.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    Create()

    Create an instance of the config.

    Declaration
    public static TransactionConfigBuilder Create()
    Returns
    Type Description
    TransactionConfigBuilder

    An instance of the TransactionConfigBuilder.

    | Improve this Doc View Source

    DurabilityLevel(DurabilityLevel)

    The writes of all transactions created by this object will be performed with this durability setting.

    Declaration
    public TransactionConfigBuilder DurabilityLevel(DurabilityLevel durabilityLevel)
    Parameters
    Type Name Description
    Couchbase.KeyValue.DurabilityLevel durabilityLevel

    A value from the DurabilityLevel(DurabilityLevel) enum.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    ExpirationTime(TimeSpan)

    Set the ExpirationTime value.

    Declaration
    public TransactionConfigBuilder ExpirationTime(TimeSpan expirationTime)
    Parameters
    Type Name Description
    TimeSpan expirationTime

    The maximum time that transactions created by this Transactions object can run for, before expiring.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    KeyValueTimeout(TimeSpan)

    Set the default timeout used for all KV writes.

    Declaration
    public TransactionConfigBuilder KeyValueTimeout(TimeSpan keyValueTimeout)
    Parameters
    Type Name Description
    TimeSpan keyValueTimeout

    The default timeout used for all KV writes.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    LoggerFactory(ILoggerFactory)

    The ILoggerFactory to be used for logging in the Transactions internals.

    Declaration
    public TransactionConfigBuilder LoggerFactory(ILoggerFactory loggerFactory)
    Parameters
    Type Name Description
    ILoggerFactory loggerFactory

    The logger factory.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    | Improve this Doc View Source

    MetadataCollection(ICouchbaseCollection)

    Set Couchbase.KeyValue.ICouchbaseCollection to use for Active Transaction Record metadata.

    Declaration
    public TransactionConfigBuilder MetadataCollection(ICouchbaseCollection metadataCollection)
    Parameters
    Type Name Description
    Couchbase.KeyValue.ICouchbaseCollection metadataCollection

    The collection to use.

    Returns
    Type Description
    TransactionConfigBuilder

    The builder.

    Remarks

    If this is not set, then the metadata collection will be chosen based on the VBucket of the first document modification in the transaction.

    | Improve this Doc View Source

    QueryConfig(TransactionQueryConfigBuilder)

    Configuration builder for values related to Query.

    Declaration
    public TransactionConfigBuilder QueryConfig(TransactionQueryConfigBuilder queryConfigBuilder)
    Parameters
    Type Name Description
    TransactionQueryConfigBuilder queryConfigBuilder

    A TransactionQueryConfigBuilder to configure query options for transactions.

    Returns
    Type Description
    TransactionConfigBuilder

    The original TransactionConfigBuilder.

    Extension Methods

    Extensions.QueryConfig(TransactionConfigBuilder, Action<TransactionQueryConfigBuilder>)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021 Couchbase, Inc.