Class QBackendTransaction
java.lang.Object
com.kingsrook.qqq.backend.core.actions.QBackendTransaction
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
MongoDBTransaction
,RDBMSTransaction
Container wherein backend modules can track data and/or objects that are
part of a transaction.
Most obvious use-case would be a JDBC Connection. See subclass in rdbms module.
Ditto MongoDB.
Note: One would imagine that this class shouldn't ever implement Serializable...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close any resources associated with the transaction.void
commit()
Commit the transaction.static QBackendTransaction
openFor
(AbstractTableActionInput input) void
rollback()
Rollback the transaction.
-
Constructor Details
-
QBackendTransaction
public QBackendTransaction()
-
-
Method Details
-
openFor
- Throws:
QException
-
commit
-
rollback
-
close
public void close()Close any resources associated with the transaction. In theory, should only be called after a commit or rollback was done.- Specified by:
close
in interfaceAutoCloseable
-