Synchronous transactions are defined and executed as follows:
Begin (create) the transaction, which is referenced by an
NdbTransaction
object typically created usingNdb::startTransaction()
. At this point, the transaction is merely being defined; it is not yet sent to the NDB kernel.-
Define operations and add them to the transaction, using one or more of the following, along with the appropriate methods of the respective
NdbOperation
class (or possibly one or more of its subclasses):At this point, the transaction has still not yet been sent to the NDB kernel.
Execute the transaction, using the
NdbTransaction::execute()
method.Close the transaction by calling
Ndb::closeTransaction()
.
For an example of this process, see Section 2.5.2, “NDB API Example Using Synchronous Transactions”.
To execute several synchronous transactions in parallel, you
can either use multiple Ndb
objects in several threads, or start multiple application
programs.