public abstract class ClientSessionContext extends java.lang.Object implements SessionContext
| Constructor and Description |
|---|
ClientSessionContext(ClientSession clientSession) |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceClusterTime(BsonDocument clusterTime)
Advance the cluster time.
|
void |
advanceOperationTime(BsonTimestamp operationTime)
Advance the operation time.
|
long |
advanceTransactionNumber()
Advance the transaction number.
|
ClientSession |
getClientSession() |
BsonDocument |
getClusterTime()
Gets the current cluster time for this session context.
|
BsonTimestamp |
getOperationTime()
Gets the current operation time for this session context
|
BsonDocument |
getSessionId()
Gets the session identifier if this context has a session backing it.
|
long |
getTransactionNumber()
Gets the current transaction number.
|
boolean |
hasSession()
Returns true if there is a true server session associated with this context.
|
boolean |
isCausallyConsistent()
Gets whether this context is associated with a causally consistent session.
|
boolean |
isSessionMarkedDirty()
Whether the server session is marked dirty.
|
void |
markSessionDirty()
Mark the session as dirty.
|
void |
setRecoveryToken(BsonDocument recoveryToken)
Sets the recovery token in the session.
|
void |
unpinServerAddress()
Unpin a mongos from a session.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReadConcern, hasActiveTransaction, isImplicitSession, notifyMessageSentpublic ClientSessionContext(ClientSession clientSession)
public ClientSession getClientSession()
public boolean hasSession()
SessionContexthasSession in interface SessionContextpublic BsonDocument getSessionId()
SessionContextgetSessionId in interface SessionContextpublic boolean isCausallyConsistent()
SessionContextisCausallyConsistent in interface SessionContextpublic long getTransactionNumber()
SessionContextgetTransactionNumber in interface SessionContextpublic long advanceTransactionNumber()
SessionContextadvanceTransactionNumber in interface SessionContextpublic BsonTimestamp getOperationTime()
SessionContextgetOperationTime in interface SessionContextpublic void advanceOperationTime(BsonTimestamp operationTime)
SessionContextadvanceOperationTime in interface SessionContextoperationTime - the new operation time timepublic BsonDocument getClusterTime()
SessionContextgetClusterTime in interface SessionContextpublic void advanceClusterTime(BsonDocument clusterTime)
SessionContextadvanceClusterTime in interface SessionContextclusterTime - the new cluster timepublic void setRecoveryToken(BsonDocument recoveryToken)
SessionContextsetRecoveryToken in interface SessionContextrecoveryToken - the recovery tokenpublic void unpinServerAddress()
SessionContextunpinServerAddress in interface SessionContextpublic void markSessionDirty()
SessionContextmarkSessionDirty in interface SessionContextpublic boolean isSessionMarkedDirty()
SessionContextisSessionMarkedDirty in interface SessionContextCopyright © 2010 - 2023 Adobe. All Rights Reserved