Package com.mongodb

Class TransactionOptions.Builder

  • Enclosing class:
    TransactionOptions

    @Deprecated(since="2021-05-27")
    public static final class TransactionOptions.Builder
    extends java.lang.Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    The builder for transaction options
    • Method Detail

      • readConcern

        public TransactionOptions.Builder readConcern​(@Nullable
                                                      ReadConcern readConcern)
        Deprecated.
        Sets the read concern.
        Parameters:
        readConcern - the read concern
        Returns:
        this
      • writeConcern

        public TransactionOptions.Builder writeConcern​(@Nullable
                                                       WriteConcern writeConcern)
        Deprecated.
        Sets the write concern.
        Parameters:
        writeConcern - the write concern, which must be acknowledged
        Returns:
        this
      • readPreference

        public TransactionOptions.Builder readPreference​(@Nullable
                                                         ReadPreference readPreference)
        Deprecated.
        Sets the read preference.
        Parameters:
        readPreference - the read preference, which currently must be primary. This restriction may be relaxed in future versions.
        Returns:
        this
      • maxCommitTime

        public TransactionOptions.Builder maxCommitTime​(@Nullable
                                                        java.lang.Long maxCommitTime,
                                                        java.util.concurrent.TimeUnit timeUnit)
        Deprecated.
        Sets the maximum execution time on the server for the commitTransaction operation.
        Parameters:
        maxCommitTime - the max commit time, which must be either null or greater than zero, in the given time unit
        timeUnit - the time unit, which may not be null
        Returns:
        this
        Since:
        3.11
      • build

        public TransactionOptions build()
        Deprecated.
        Build the transaction options instance.
        Returns:
        The TransactionOptions