aerospike.Transaction
— Multi Record Transaction Class
In the whole documentation, “commands” are all database commands that can be sent to the server (e.g single-record operations, batch, scans, or queries).
“Transactions” link individual commands (except for scan and query) together so they can be rolled forward or backward consistently.
Methods
- class aerospike.Transaction
Initialize multi-record transaction (MRT), assign random transaction id and initialize reads/writes hashmaps with default capacities.
For both parameters, an unsigned 32-bit integer must be passed and the minimum value should be 16.
- Parameters:
- id
Get the random transaction id that was generated on class instance creation.
The value is an unsigned 64-bit integer.
This attribute is read-only.
- Type:
- state
One of the Multi-record Transaction State constants.
This attribute is read-only.
- Type:
- timeout
MRT timeout in seconds. The timer starts when the MRT monitor record is created. This occurs when the first command in the MRT is executed. If the timeout is reached before
commit()
orabort()
is called, the server will expire and rollback the MRT.The default client MRT timeout is zero. This means use the server configuration
mrt-duration
as the MRT timeout. The defaultmrt-duration
is 10 seconds.This attribute can be read and written to.
- Type: