Package com.mongodb
Class TransactionOptions
- java.lang.Object
-
- com.mongodb.TransactionOptions
-
@Immutable @Deprecated(since="2021-05-27") public final class TransactionOptions extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.Options to apply to transactions. The default values for the options depend on context. For options specified per-transaction, the default values come from the default transaction options. For the default transaction options themselves, the default values come from the MongoClient on which the session was started.- Since:
- 3.8
- See Also:
ClientSession
,ClientSessionOptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransactionOptions.Builder
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TransactionOptions.Builder
builder()
Deprecated.Gets an instance of a builderboolean
equals(java.lang.Object o)
Deprecated.java.lang.Long
getMaxCommitTime(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the maximum amount of time to allow a single commitTransaction command to execute.ReadConcern
getReadConcern()
Deprecated.Gets the read concern.ReadPreference
getReadPreference()
Deprecated.Gets the read preference.WriteConcern
getWriteConcern()
Deprecated.Gets the write concern.int
hashCode()
Deprecated.static TransactionOptions
merge(TransactionOptions options, TransactionOptions defaultOptions)
Deprecated.Merge the two provided transaction options, with the first taking precedence over the second.java.lang.String
toString()
Deprecated.
-
-
-
Method Detail
-
getReadConcern
@Nullable public ReadConcern getReadConcern()
Deprecated.Gets the read concern.- Returns:
- the read concern
-
getWriteConcern
@Nullable public WriteConcern getWriteConcern()
Deprecated.Gets the write concern.- Returns:
- the write concern
-
getReadPreference
@Nullable public ReadPreference getReadPreference()
Deprecated.Gets the read preference.- Returns:
- the write concern
-
getMaxCommitTime
@Nullable public java.lang.Long getMaxCommitTime(java.util.concurrent.TimeUnit timeUnit)
Deprecated.Gets the maximum amount of time to allow a single commitTransaction command to execute. The default is null, which places no limit on the execution time.- Parameters:
timeUnit
- the time unit to return the result in- Returns:
- the maximum execution time in the given time unit
- Since:
- 3.11
-
builder
public static TransactionOptions.Builder builder()
Deprecated.Gets an instance of a builder- Returns:
- a builder instance
-
merge
public static TransactionOptions merge(TransactionOptions options, TransactionOptions defaultOptions)
Deprecated.Merge the two provided transaction options, with the first taking precedence over the second.- Parameters:
options
- the transaction options, which take precedence for any property that is non-nulldefaultOptions
- the default transaction options- Returns:
- the merged transaction options
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-