avl._core.transaction module
- class avl._core.transaction.Transaction(*args: Any, **kwargs: Any)[source]
- __init__(name: str, parent: Component) None[source]
Initialize a new Transaction.
- Parameters:
name (str) – The name of the transaction.
- get_id() int[source]
Get the ID of the transaction.
- Returns:
The ID of the transaction.
- Return type:
int
- add_event(name: str, callback: Callable[[...], Any] | None = None) None[source]
Add an event to the transaction.
- Parameters:
name (str) – The name of the event.
callback (function or None) – The callback function to be called when the event is set.
- get_event(name: str) None[source]
Get an event by name.
- Parameters:
name (str) – The name of the event.
- Returns:
The event details or None if the event does not exist.
- Return type:
list or None