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 |
notifyMessageSent()
Notify the session context that a message has been sent.
|
public static final NoOpSessionContext INSTANCE
public boolean hasSession()
SessionContext
hasSession
in interface SessionContext
public boolean isImplicitSession()
SessionContext
isImplicitSession
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 boolean notifyMessageSent()
SessionContext
notifyMessageSent
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 timepublic boolean hasActiveTransaction()
SessionContext
hasActiveTransaction
in interface SessionContext
public ReadConcern getReadConcern()
SessionContext
getReadConcern
in interface SessionContext
Copyright © 2010 - 2020 Adobe. All Rights Reserved