Package com.mongodb.async.client
Interface ClientSession
-
- All Superinterfaces:
AutoCloseable
,ClientSession
,Closeable
@Deprecated public interface ClientSession extends ClientSession
Deprecated.Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)A client session that supports transactions.- Since:
- 3.8
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
abortTransaction(SingleResultCallback<Void> callback)
Deprecated.Abort a transaction in the context of this session.void
commitTransaction(SingleResultCallback<Void> callback)
Deprecated.Commit a transaction in the context of this session.TransactionOptions
getTransactionOptions()
Deprecated.Gets the transaction options.boolean
hasActiveTransaction()
Deprecated.Returns true if there is an active transaction on this session, and false otherwiseboolean
notifyMessageSent()
Deprecated.Notify the client session that a message has been sent.void
startTransaction()
Deprecated.Start a transaction in the context of this session with default transaction options.void
startTransaction(TransactionOptions transactionOptions)
Deprecated.Start a transaction in the context of this session with the given transaction options.-
Methods inherited from interface com.mongodb.session.ClientSession
advanceClusterTime, advanceOperationTime, close, getClusterTime, getOperationTime, getOptions, getOriginator, getPinnedServerAddress, getRecoveryToken, getServerSession, isCausallyConsistent, setPinnedServerAddress, setRecoveryToken
-
-
-
-
Method Detail
-
hasActiveTransaction
boolean hasActiveTransaction()
Deprecated.Returns true if there is an active transaction on this session, and false otherwise- Returns:
- true if there is an active transaction on this session
- Since server release
- 4.0
-
notifyMessageSent
boolean notifyMessageSent()
Deprecated.Notify the client session that a message has been sent.For internal use only
- Returns:
- true if this is the first message sent, false otherwise
-
getTransactionOptions
TransactionOptions getTransactionOptions()
Deprecated.Gets the transaction options. Only call this method of the session has an active transaction- Returns:
- the transaction options
-
startTransaction
void startTransaction()
Deprecated.Start a transaction in the context of this session with default transaction options. A transaction can not be started if there is already an active transaction on this session.- Since server release
- 4.0
-
startTransaction
void startTransaction(TransactionOptions transactionOptions)
Deprecated.Start a transaction in the context of this session with the given transaction options. A transaction can not be started if there is already an active transaction on this session.- Parameters:
transactionOptions
- the options to apply to the transaction- Since server release
- 4.0
-
commitTransaction
void commitTransaction(SingleResultCallback<Void> callback)
Deprecated.Commit a transaction in the context of this session. A transaction can only be commmited if one has first been started.- Parameters:
callback
- the result callback- Since server release
- 4.0
-
abortTransaction
void abortTransaction(SingleResultCallback<Void> callback)
Deprecated.Abort a transaction in the context of this session. A transaction can only be aborted if one has first been started.- Parameters:
callback
- the result callback- Since server release
- 4.0
-
-