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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReadConcern, hasActiveTransaction, isImplicitSession, notifyMessageSent
public ClientSessionContext(ClientSession clientSession)
public ClientSession getClientSession()
public boolean hasSession()
SessionContext
hasSession
in interface SessionContext
public BsonDocument getSessionId()
SessionContext
getSessionId
in interface SessionContext
public boolean isCausallyConsistent()
SessionContext
isCausallyConsistent
in interface SessionContext
public long getTransactionNumber()
SessionContext
getTransactionNumber
in interface SessionContext
public long advanceTransactionNumber()
SessionContext
advanceTransactionNumber
in interface SessionContext
public BsonTimestamp getOperationTime()
SessionContext
getOperationTime
in interface SessionContext
public void advanceOperationTime(BsonTimestamp operationTime)
SessionContext
advanceOperationTime
in interface SessionContext
operationTime
- the new operation time timepublic BsonDocument getClusterTime()
SessionContext
getClusterTime
in interface SessionContext
public void advanceClusterTime(BsonDocument clusterTime)
SessionContext
advanceClusterTime
in interface SessionContext
clusterTime
- the new cluster timeCopyright © 2010 - 2020 Adobe. All Rights Reserved