public class BaseClientSessionImpl extends Object implements ClientSession
| Constructor and Description |
|---|
BaseClientSessionImpl(ServerSessionPool serverSessionPool,
Object originator,
ClientSessionOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceClusterTime(BsonDocument newClusterTime) |
void |
advanceOperationTime(BsonTimestamp newOperationTime)
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.
|
Object |
getOriginator()
Gets the originator for the session.
|
ServerSession |
getServerSession() |
boolean |
isCausallyConsistent()
Returns true if operations in this session must be causally consistent
|
public BaseClientSessionImpl(ServerSessionPool serverSessionPool, Object originator, ClientSessionOptions options)
public ClientSessionOptions getOptions()
ClientSessiongetOptions in interface ClientSessionpublic boolean isCausallyConsistent()
ClientSessionisCausallyConsistent in interface ClientSessionpublic Object getOriginator()
ClientSessionImportant because sessions must only be used by their own originator.
getOriginator in interface ClientSessionpublic BsonDocument getClusterTime()
getClusterTime in interface ClientSessionpublic BsonTimestamp getOperationTime()
ClientSessiongetOperationTime in interface ClientSessionpublic ServerSession getServerSession()
getServerSession in interface ClientSessionpublic void advanceOperationTime(BsonTimestamp newOperationTime)
ClientSessionadvanceOperationTime in interface ClientSessionnewOperationTime - the operation timepublic void advanceClusterTime(BsonDocument newClusterTime)
advanceClusterTime in interface ClientSessionnewClusterTime - the cluster time to advance topublic void close()
close in interface ClientSessionclose in interface Closeableclose in interface AutoCloseableCopyright © 2010 - 2020 Adobe. All Rights Reserved