Class MongoDBConsistentReadTransaction
java.lang.Object
com.kingsrook.qqq.backend.core.actions.QBackendTransaction
com.kingsrook.qqq.backend.module.mongodb.actions.MongoDBTransaction
com.kingsrook.qqq.backend.module.mongodb.actions.MongoDBConsistentReadTransaction
- All Implemented Interfaces:
AutoCloseable
MongoDB transaction opened by MongoDBBackendModule.openConsistentReadTransaction -
wrapping a session that has snapshot read concern (if the server supports
it). Never starts a mongo transaction (snapshot sessions can't have one),
and so is for reads only.
-
Constructor Summary
ConstructorsConstructorDescriptionMongoDBConsistentReadTransaction(MongoDBBackendMetaData backend, com.mongodb.client.MongoClient mongoClient, com.mongodb.client.ClientSession clientSession, ConsistencyGuarantee consistencyGuarantee) Constructor -
Method Summary
Modifier and TypeMethodDescriptionWhat a transaction from openConsistentReadTransaction guarantees.Methods inherited from class com.kingsrook.qqq.backend.module.mongodb.actions.MongoDBTransaction
close, commit, getClientSession, getMongoClient, rollbackMethods inherited from class com.kingsrook.qqq.backend.core.actions.QBackendTransaction
addAfterCommitCallback, discardAfterCommitCallbacks, getExportedSnapshotId, openConsistentReadFor, openFor, runAfterCommitCallbacks
-
Constructor Details
-
MongoDBConsistentReadTransaction
public MongoDBConsistentReadTransaction(MongoDBBackendMetaData backend, com.mongodb.client.MongoClient mongoClient, com.mongodb.client.ClientSession clientSession, ConsistencyGuarantee consistencyGuarantee) Constructor
-
-
Method Details
-
getConsistencyGuarantee
Description copied from class:QBackendTransactionWhat a transaction from openConsistentReadTransaction guarantees. Callers should record this, rather than assume ONE_INSTANT.- Overrides:
getConsistencyGuaranteein classQBackendTransaction
-