TransactionManager class
Manages ACID transactions across Rift boxes.
The TransactionManager coordinates transaction lifecycle: beginning, committing, and rolling back transactions. It also provides a convenience method runInTransaction that automatically commits on success and rolls back on error.
Constructors
Properties
- activeCount → int
-
The number of currently active transactions.
no setter
-
activeTransactionIds
→ List<
String> -
IDs of all currently active transactions.
no setter
-
committedHistory
→ List<
RiftTransaction> -
A list of recently committed transactions (for audit purposes).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyToBox(
RiftTransaction tx, dynamic box) → Future< int> - Applies the operations recorded in a committed transaction to a box.
-
begin(
) → RiftTransaction - Begins a new transaction and returns it.
-
commit(
RiftTransaction tx) → void - Commits a transaction, marking it as successfully completed.
-
getTransaction(
String id) → RiftTransaction? - Retrieves an active transaction by its ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Clears all active transactions and history.
-
rollback(
RiftTransaction tx) → void - Rolls back a transaction, discarding all its operations.
-
runInTransaction<
T> (Future< T> fn(RiftTransaction tx)) → Future<T> - Executes a function within a transaction, automatically committing on success and rolling back on error.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited