public interface Transactional
TxRunnable
tasks. Each task submitted will be executed
inside a transaction.Modifier and Type | Method and Description |
---|---|
void |
execute(int timeoutInSeconds,
TxRunnable runnable)
Executes a set of operations via a
TxRunnable that are committed as a single
transaction with a given timeout. |
void |
execute(TxRunnable runnable)
Executes a set of operations via a
TxRunnable that are committed as a single
transaction. |
void execute(TxRunnable runnable) throws org.apache.tephra.TransactionFailureException
TxRunnable
that are committed as a single
transaction. The TxRunnable
can gain access to a Dataset
through the provided
DatasetContext
.runnable
- the runnable to be executed in the transactionorg.apache.tephra.TransactionFailureException
- if failed to execute the given TxRunnable
in a
transactionvoid execute(int timeoutInSeconds, TxRunnable runnable) throws org.apache.tephra.TransactionFailureException
TxRunnable
that are committed as a single
transaction with a given timeout. The TxRunnable
can gain access to a Dataset
through the provided DatasetContext
.timeoutInSeconds
- the transaction timeout for the transaction, in secondsrunnable
- the runnable to be executed in the transactionorg.apache.tephra.TransactionFailureException
- if failed to execute the given TxRunnable
in a
transactionCopyright © 2023 Cask Data, Inc. Licensed under the Apache License, Version 2.0.