public class BaseClientSessionImpl extends java.lang.Object implements ClientSession
Constructor and Description |
---|
BaseClientSessionImpl(ServerSessionPool serverSessionPool,
java.lang.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.
|
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
|
public BaseClientSessionImpl(ServerSessionPool serverSessionPool, java.lang.Object originator, ClientSessionOptions options)
public ClientSessionOptions getOptions()
ClientSession
getOptions
in interface ClientSession
public boolean isCausallyConsistent()
ClientSession
isCausallyConsistent
in interface ClientSession
public java.lang.Object getOriginator()
ClientSession
Important because sessions must only be used by their own originator.
getOriginator
in interface ClientSession
public BsonDocument getClusterTime()
getClusterTime
in interface ClientSession
public BsonTimestamp getOperationTime()
ClientSession
getOperationTime
in interface ClientSession
public ServerSession getServerSession()
getServerSession
in interface ClientSession
public void advanceOperationTime(BsonTimestamp newOperationTime)
ClientSession
advanceOperationTime
in interface ClientSession
newOperationTime
- the operation timepublic void advanceClusterTime(BsonDocument newClusterTime)
advanceClusterTime
in interface ClientSession
newClusterTime
- the cluster time to advance topublic void close()
close
in interface ClientSession
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
Copyright © 2010 - 2020 Adobe. All Rights Reserved