Interface OpenTransaction
-
- All Superinterfaces:
Transaction
public interface OpenTransaction extends Transaction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.palantir.atlasdb.transaction.api.Transaction
Transaction.TransactionType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T,E extends Exception>
Tfinish(TransactionTask<T,E> task)
Runs a provided task, commits the transaction, and performs cleanup.<T,E extends Exception>
TfinishWithCallback(TransactionTask<T,E> task, Runnable callback)
Likefinish(TransactionTask)
, except runs a callback after the task has finished.-
Methods inherited from interface com.palantir.atlasdb.transaction.api.Transaction
abort, commit, commit, delete, deleteWithMetadata, disableReadWriteConflictChecking, get, getAsync, getRange, getRanges, getRanges, getRanges, getRanges, getRangesLazy, getReadSentinelBehavior, getRows, getRowsColumnRange, getRowsColumnRange, getRowsColumnRangeIterator, getSortedColumns, getTimestamp, getTransactionType, getWithExpectedNumberOfCells, isAborted, isUncommitted, markTableInvolved, onSuccess, put, putWithMetadata, setTransactionType, useTable
-
-
-
-
Method Detail
-
finish
<T,E extends Exception> T finish(TransactionTask<T,E> task) throws E extends Exception, TransactionFailedRetriableException
Runs a provided task, commits the transaction, and performs cleanup. If no further work needs to be done with the transaction, a no-op task can be passed in.- Returns:
- value returned by the task
- Throws:
E extends Exception
TransactionFailedRetriableException
-
finishWithCallback
<T,E extends Exception> T finishWithCallback(TransactionTask<T,E> task, Runnable callback) throws E extends Exception, TransactionFailedRetriableException
Likefinish(TransactionTask)
, except runs a callback after the task has finished. This callback will not run while the transaction remains in an uncommitted state, but may run afterwards, regardless of whether the commit was successful, finished, or aborted. If the callback is run, it will run before anyTransaction.onSuccess(Runnable)
callbacks.- Throws:
E extends Exception
TransactionFailedRetriableException
-
-