@NotThreadSafe public interface ClientSession extends java.io.Closeable
ClientSessionOptions
Modifier and Type | Method and Description |
---|---|
void |
advanceClusterTime(BsonDocument clusterTime) |
void |
advanceOperationTime(BsonTimestamp operationTime)
Set the operation time of the last operation executed in this session.
|
void |
close() |
BsonDocument |
getClusterTime() |
BsonTimestamp |
getOperationTime()
Gets the operation time of the last operation executed in this session.
|
ClientSessionOptions |
getOptions()
Get the options for this session.
|
java.lang.Object |
getOriginator()
Gets the originator for the session.
|
ServerSession |
getServerSession() |
boolean |
isCausallyConsistent()
Returns true if operations in this session must be causally consistent
|
ClientSessionOptions getOptions()
boolean isCausallyConsistent()
java.lang.Object getOriginator()
Important because sessions must only be used by their own originator.
ServerSession getServerSession()
BsonTimestamp getOperationTime()
void advanceOperationTime(BsonTimestamp operationTime)
operationTime
- the operation timevoid advanceClusterTime(BsonDocument clusterTime)
clusterTime
- the cluster time to advance toBsonDocument getClusterTime()
void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
Copyright © 2010 - 2020 Adobe. All Rights Reserved