@Immutable public final class TransactionOptions extends Object
ClientSession
,
ClientSessionOptions
Modifier and Type | Class | Description |
---|---|---|
static class |
TransactionOptions.Builder |
The builder for transaction options
|
Modifier and Type | Method | Description |
---|---|---|
static TransactionOptions.Builder |
builder() |
Gets an instance of a builder
|
boolean |
equals(Object o) |
|
ReadConcern |
getReadConcern() |
Gets the read concern.
|
ReadPreference |
getReadPreference() |
Gets the read preference.
|
WriteConcern |
getWriteConcern() |
Gets the write concern.
|
int |
hashCode() |
|
static TransactionOptions |
merge(TransactionOptions options,
TransactionOptions defaultOptions) |
Merge the two provided transaction options, with the first taking precedence over the second.
|
String |
toString() |
@Nullable public ReadConcern getReadConcern()
@Nullable public WriteConcern getWriteConcern()
@Nullable public ReadPreference getReadPreference()
public static TransactionOptions.Builder builder()
public static TransactionOptions merge(TransactionOptions options, TransactionOptions defaultOptions)
options
- the transaction options, which take precedence for any property that is non-nulldefaultOptions
- the default transaction options