Package com.mongodb.internal.session
Class BaseClientSessionImpl
java.lang.Object
com.mongodb.internal.session.BaseClientSessionImpl
- All Implemented Interfaces:
ClientSession
,Closeable
,AutoCloseable
@Deprecated(since="2021-05-27")
public class BaseClientSessionImpl
extends Object
implements ClientSession
Deprecated.
-
Constructor Summary
ConstructorsConstructorDescriptionBaseClientSessionImpl
(ServerSessionPool serverSessionPool, Object originator, ClientSessionOptions options) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
advanceClusterTime
(BsonDocument newClusterTime) Deprecated.void
advanceOperationTime
(BsonTimestamp newOperationTime) 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.
-
Constructor Details
-
BaseClientSessionImpl
public BaseClientSessionImpl(ServerSessionPool serverSessionPool, Object originator, ClientSessionOptions options) Deprecated.
-
-
Method Details
-
getPinnedServerAddress
Deprecated.Description copied from interface:ClientSession
Get the server address of the pinned mongos on this session. For internal use only.- Specified by:
getPinnedServerAddress
in interfaceClientSession
- Returns:
- the server address of the pinned mongos
-
setPinnedServerAddress
Deprecated.Description copied from interface:ClientSession
Set the server address of the pinned mongos. For internal use only.- Specified by:
setPinnedServerAddress
in interfaceClientSession
- Parameters:
address
- the server address to pin
-
getRecoveryToken
Deprecated.Description copied from interface:ClientSession
Get the recovery token from the latest outcome in a sharded transaction. For internal use only.- Specified by:
getRecoveryToken
in interfaceClientSession
- Returns:
- the recovery token
-
setRecoveryToken
Deprecated.Description copied from interface:ClientSession
Set the recovery token. For internal use only.- Specified by:
setRecoveryToken
in interfaceClientSession
- Parameters:
recoveryToken
- the recovery token
-
getOptions
Deprecated.Description copied from interface:ClientSession
Get the options for this session.- Specified by:
getOptions
in interfaceClientSession
- Returns:
- the options, which may not be null
-
isCausallyConsistent
public boolean isCausallyConsistent()Deprecated.Description copied from interface:ClientSession
Returns true if operations in this session must be causally consistent- Specified by:
isCausallyConsistent
in interfaceClientSession
- Returns:
- whether operations in this session must be causally consistent.
-
getOriginator
Deprecated.Description copied from interface:ClientSession
Gets the originator for the session.Important because sessions must only be used by their own originator.
- Specified by:
getOriginator
in interfaceClientSession
- Returns:
- the sessions originator
-
getClusterTime
Deprecated.- Specified by:
getClusterTime
in interfaceClientSession
- Returns:
- the latest cluster time seen by this session
-
getOperationTime
Deprecated.Description copied from interface:ClientSession
Gets the operation time of the last operation executed in this session.- Specified by:
getOperationTime
in interfaceClientSession
- Returns:
- the operation time
-
getServerSession
Deprecated.- Specified by:
getServerSession
in interfaceClientSession
- Returns:
- the server session
-
advanceOperationTime
Deprecated.Description copied from interface:ClientSession
Set the operation time of the last operation executed in this session.- Specified by:
advanceOperationTime
in interfaceClientSession
- Parameters:
newOperationTime
- the operation time
-
advanceClusterTime
Deprecated.- Specified by:
advanceClusterTime
in interfaceClientSession
- Parameters:
newClusterTime
- the cluster time to advance to
-
close
public void close()Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceClientSession
- Specified by:
close
in interfaceCloseable
-