public final class ClusterClockAdvancingSessionContext extends Object implements SessionContext
| Constructor and Description |
|---|
ClusterClockAdvancingSessionContext(SessionContext wrapped,
ClusterClock clusterClock) |
| 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.
|
BsonDocument |
getClusterTime()
Gets the current cluster time for this session context.
|
BsonTimestamp |
getOperationTime()
Gets the current operation time for this session context
|
ReadConcern |
getReadConcern()
Gets the read concern to apply to operations on this binding.
|
BsonDocument |
getSessionId()
Gets the session identifier if this context has a session backing it.
|
long |
getTransactionNumber()
Gets the current transaction number.
|
boolean |
hasActiveTransaction()
Gets whether the session has an active transaction
|
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 |
isImplicitSession()
Returns true if the session is implicit, and false if the application started the session explicity.
|
boolean |
notifyMessageSent()
Notify the session context that a message has been sent.
|
public ClusterClockAdvancingSessionContext(SessionContext wrapped, ClusterClock clusterClock)
public boolean hasSession()
SessionContexthasSession in interface SessionContextpublic boolean isImplicitSession()
SessionContextisImplicitSession 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 boolean notifyMessageSent()
SessionContextnotifyMessageSent 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 boolean hasActiveTransaction()
SessionContexthasActiveTransaction in interface SessionContextpublic ReadConcern getReadConcern()
SessionContextgetReadConcern in interface SessionContextCopyright © 2010 - 2020 Adobe. All Rights Reserved