Executes the given function as an atomic operation.
Fallible transaction execution. If any operation fails, all the already executed
successful operation’s compensation actions are executed in reverse order and the transaction
returns with a failure.
Generates an idempotency key. This operation will never be replayed —
i.e. not only is this key generated, but it is persisted and committed, such that the key can be used in third-party systems (e.g. payment processing)
to introduce idempotence.
Retry the transaction in case of failure. If any operation returns with a failure, all
the already executed successful operation’s compensation actions are executed in reverse order
and the transaction gets retried, using Golem’s active retry policy.
Same as infallible_transaction
, but with strong rollback guarantees. The compensation actions
are guaranteed to be always executed before the transaction gets retried, even if it
fails due to a panic or an external executor failure.
Marks a block as an atomic operation
Constructs an Operation
from two closures: one for executing the operation,
and one for rolling it back. The rollback operation always sees the input and
the output of the operation.
A generic interface for defining transactions, where the transaction mode is
determined by the function’s parameter (it can be FallibleTransaction
or InfallibleTransaction
).
Temporarily sets the idempotence mode to the given value.
Temporarily sets the oplog persistence level to the given value.
Temporarily sets the retry policy to the given value.
Executes the given function with the idempotence mode set to the given value.
Executes the given function with the oplog persistence level set to the given value.
Executes the given function with the retry policy set to the given value.