Interface TransactionManager<C extends TransactionContext>
- Type Parameters:
C-
- All Superinterfaces:
ContextManager
TransactionManager
- Version:
- 0.0.1
- Author:
- scx567888
-
Method Summary
Modifier and TypeMethodDescription<T, X extends Throwable>
TautoTransaction(cool.scx.function.CallableX<T, X> handler) 无异常自动提交 异常自动回滚<X extends Throwable>
voidautoTransaction(cool.scx.function.RunnableX<X> handler) 无异常自动提交 异常自动回滚<X extends Throwable>
voidwithTransaction(cool.scx.function.ConsumerX<C, X> handler) 需手动处理事务<T, X extends Throwable>
TwithTransaction(cool.scx.function.FunctionX<C, T, X> handler) 需手动处理事务Methods inherited from interface cool.scx.data.context.ContextManager
autoContext, autoContext
-
Method Details
-
withTransaction
<T, X extends Throwable> T withTransaction(cool.scx.function.FunctionX<C, T, throws DataAccessException, XX> handler) 需手动处理事务- Throws:
DataAccessExceptionX
-
withTransaction
<X extends Throwable> void withTransaction(cool.scx.function.ConsumerX<C, X> handler) throws DataAccessException, X需手动处理事务- Throws:
DataAccessExceptionX
-
autoTransaction
<T, X extends Throwable> T autoTransaction(cool.scx.function.CallableX<T, X> handler) throws DataAccessException, X无异常自动提交 异常自动回滚- Throws:
DataAccessExceptionX
-
autoTransaction
<X extends Throwable> void autoTransaction(cool.scx.function.RunnableX<X> handler) throws DataAccessException, X 无异常自动提交 异常自动回滚- Throws:
DataAccessExceptionX
-