public class NoOpSessionContext extends java.lang.Object implements SessionContext
This class should not be considered a part of the public API.
| Modifier and Type | Field and Description |
|---|---|
static NoOpSessionContext |
INSTANCE
A singleton instance of a NoOpSessionContext
|
| Constructor and Description |
|---|
NoOpSessionContext() |
| 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 |
isSessionMarkedDirty()
Whether the server session is marked dirty.
|
void |
markSessionDirty()
Mark the session as dirty.
|
boolean |
notifyMessageSent()
Notify the session context that a message has been sent.
|
void |
setRecoveryToken(BsonDocument recoveryToken)
Sets the recovery token in the session.
|
void |
unpinServerAddress()
Unpin a mongos from a session.
|
public static final NoOpSessionContext INSTANCE
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 SessionContextpublic 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