Package io.vertx.mongo
Class ClientSessionOptions
- java.lang.Object
-
- io.vertx.mongo.ClientSessionOptions
-
public class ClientSessionOptions extends java.lang.Object
The options to apply to aClientSession
.- Since:
- 3.6
- See Also:
ClientSession
- Since server release
- 3.6
- MongoDB documentation
- Causal Consistency
-
-
Constructor Summary
Constructors Constructor Description ClientSessionOptions()
ClientSessionOptions(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionOptions
getDefaultTransactionOptions()
Gets the default transaction options for the session.java.lang.Boolean
isCausallyConsistent()
Whether operations using the session should causally consistent with each other.ClientSessionOptions
setCausallyConsistent(java.lang.Boolean causallyConsistent)
Sets whether operations using the session should causally consistent with each other.ClientSessionOptions
setDefaultTransactionOptions(TransactionOptions defaultTransactionOptions)
Sets whether operations using the session should causally consistent with each other.JsonObject
toJson()
-
-
-
Constructor Detail
-
ClientSessionOptions
public ClientSessionOptions()
-
ClientSessionOptions
public ClientSessionOptions(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
setCausallyConsistent
public ClientSessionOptions setCausallyConsistent(java.lang.Boolean causallyConsistent)
Sets whether operations using the session should causally consistent with each other.- Parameters:
causallyConsistent
- whether operations using the session should be causally consistent- Returns:
- this
- MongoDB documentation
- Causal Consistency
-
isCausallyConsistent
public java.lang.Boolean isCausallyConsistent()
Whether operations using the session should causally consistent with each other.- Returns:
- whether operations using the session should be causally consistent. A null value indicates to use the global default, which is currently true.
- MongoDB documentation
- Causal Consistency
-
setDefaultTransactionOptions
public ClientSessionOptions setDefaultTransactionOptions(TransactionOptions defaultTransactionOptions)
Sets whether operations using the session should causally consistent with each other.- Parameters:
defaultTransactionOptions
- the default transaction options to use for all transactions on this session,- Returns:
- this
- Since:
- 3.8
- Since server release
- 4.0
-
getDefaultTransactionOptions
public TransactionOptions getDefaultTransactionOptions()
Gets the default transaction options for the session.- Returns:
- the default transaction options for the session
- Since:
- 3.8
- Since server release
- 4.0
-
-