public abstract class ClientSessionContext extends 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.
|
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 timeCopyright © 2010 - 2020 Adobe. All Rights Reserved