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 java.lang.Exception>
Tfinish(TransactionTask<T,E> task)
Runs a provided task, commits the transaction, and performs cleanup.<T,E extends java.lang.Exception>
TfinishWithCallback(TransactionTask<T,E> task, java.lang.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, disableReadWriteConflictChecking, get, getAsync, getRange, getRanges, getRanges, getRanges, getRanges, getRangesLazy, getReadSentinelBehavior, getRows, getRowsColumnRange, getRowsColumnRange, getRowsColumnRangeIterator, getSortedColumns, getTimestamp, getTransactionType, isAborted, isUncommitted, markTableInvolved, onSuccess, put, setTransactionType, useTable
-
-
-
-
Method Detail
-
finish
<T,E extends java.lang.Exception> T finish(TransactionTask<T,E> task) throws E extends java.lang.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 java.lang.Exception
TransactionFailedRetriableException
-
finishWithCallback
<T,E extends java.lang.Exception> T finishWithCallback(TransactionTask<T,E> task, java.lang.Runnable callback) throws E extends java.lang.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 java.lang.Exception
TransactionFailedRetriableException
-
-