Package com.mongodb.session
Interface ClientSession
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
ClientSession
- All Known Implementing Classes:
BaseClientSessionImpl
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A client session.
- Since:
- 3.6
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
advanceClusterTime
(BsonDocument clusterTime) Deprecated.void
advanceOperationTime
(BsonTimestamp operationTime) Deprecated.Set the operation time of the last operation executed in this session.void
close()
Deprecated.Deprecated.Deprecated.Gets the operation time of the last operation executed in this session.Deprecated.Get the options for this session.Deprecated.Gets the originator for the session.Deprecated.Get the server address of the pinned mongos on this session.Deprecated.Get the recovery token from the latest outcome in a sharded transaction.Deprecated.boolean
Deprecated.Returns true if operations in this session must be causally consistentvoid
setPinnedServerAddress
(ServerAddress address) Deprecated.Set the server address of the pinned mongos.void
setRecoveryToken
(BsonDocument recoveryToken) Deprecated.Set the recovery token.
-
Method Details
-
getPinnedServerAddress
Deprecated.Get the server address of the pinned mongos on this session. For internal use only.- Returns:
- the server address of the pinned mongos
- Since:
- 3.11
-
setPinnedServerAddress
Deprecated.Set the server address of the pinned mongos. For internal use only.- Parameters:
address
- the server address to pin- Since:
- 3.11
-
getRecoveryToken
Deprecated.Get the recovery token from the latest outcome in a sharded transaction. For internal use only.- Returns:
- the recovery token
- Since:
- 3.11
-
setRecoveryToken
Deprecated.Set the recovery token. For internal use only.- Parameters:
recoveryToken
- the recovery token- Since:
- 3.11
-
getOptions
ClientSessionOptions getOptions()Deprecated.Get the options for this session.- Returns:
- the options, which may not be null
-
isCausallyConsistent
boolean isCausallyConsistent()Deprecated.Returns true if operations in this session must be causally consistent- Returns:
- whether operations in this session must be causally consistent.
-
getOriginator
Object getOriginator()Deprecated.Gets the originator for the session.Important because sessions must only be used by their own originator.
- Returns:
- the sessions originator
-
getServerSession
ServerSession getServerSession()Deprecated.- Returns:
- the server session
-
getOperationTime
BsonTimestamp getOperationTime()Deprecated.Gets the operation time of the last operation executed in this session.- Returns:
- the operation time
-
advanceOperationTime
Deprecated.Set the operation time of the last operation executed in this session.- Parameters:
operationTime
- the operation time
-
advanceClusterTime
Deprecated.- Parameters:
clusterTime
- the cluster time to advance to
-
getClusterTime
BsonDocument getClusterTime()Deprecated.- Returns:
- the latest cluster time seen by this session
-
close
void close()Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-