public class ThrowingTransactionTemplate extends Object
Constructor and Description |
---|
ThrowingTransactionTemplate(TransactionalHostContextAccessor hostContextAccessor) |
Modifier and Type | Method and Description |
---|---|
<T,X extends Exception> |
execute(Class<X> exceptionType,
TransactionalHostContextAccessor.Permission permission,
ThrowingTransactionCallback<T,X> callback)
Runs an action in a transaction and returns a optional value.
|
<T,X extends Exception> |
execute(Class<X> exceptionType,
TransactionalHostContextAccessor.Propagation propagation,
ThrowingTransactionCallback<T,X> callback)
Runs an action in a transaction and returns a optional value.
|
<T,X extends Exception> |
execute(Class<X> exceptionType,
TransactionalHostContextAccessor.Propagation propagation,
TransactionalHostContextAccessor.Permission permission,
ThrowingTransactionCallback<T,X> callback)
Runs an action in a transaction and returns a optional value.
|
<T,X1 extends Exception,X2 extends Exception> |
execute(Class<X1> exceptionType,
Class<X2> exceptionType2,
TransactionalHostContextAccessor.Permission permission,
Throwing2TransactionCallback<T,X1,X2> callback)
Runs an action in a transaction and returns a optional value.
|
<T,X1 extends Exception,X2 extends Exception> |
execute(Class<X1> exceptionType,
Class<X2> exceptionType2,
TransactionalHostContextAccessor.Propagation propagation,
Throwing2TransactionCallback<T,X1,X2> callback)
Runs an action in a transaction and returns a optional value.
|
<T,X1 extends Exception,X2 extends Exception> |
execute(Class<X1> exceptionType,
Class<X2> exceptionType2,
TransactionalHostContextAccessor.Propagation propagation,
TransactionalHostContextAccessor.Permission permission,
Throwing2TransactionCallback<T,X1,X2> callback)
Runs an action in a transaction and returns a optional value.
|
public ThrowingTransactionTemplate(TransactionalHostContextAccessor hostContextAccessor)
public <T,X extends Exception> T execute(Class<X> exceptionType, TransactionalHostContextAccessor.Propagation propagation, ThrowingTransactionCallback<T,X> callback) throws X extends Exception
propagation
- the propagation mode to usecallback
- The callback class to executeX
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X extends Exception
public <T,X extends Exception> T execute(Class<X> exceptionType, TransactionalHostContextAccessor.Permission permission, ThrowingTransactionCallback<T,X> callback) throws X extends Exception
TransactionalHostContextAccessor.Propagation.REQUIRED
.permission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeX
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X extends Exception
public <T,X extends Exception> T execute(Class<X> exceptionType, TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, ThrowingTransactionCallback<T,X> callback) throws X extends Exception
propagation
- the propagation mode to usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeX
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X extends Exception
public <T,X1 extends Exception,X2 extends Exception> T execute(Class<X1> exceptionType, Class<X2> exceptionType2, TransactionalHostContextAccessor.Propagation propagation, Throwing2TransactionCallback<T,X1,X2> callback) throws X1 extends Exception, X2 extends Exception
propagation
- the propagation mode to usecallback
- The callback class to executeX1
- if it was thrown by the callbackX2
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X1 extends Exception
public <T,X1 extends Exception,X2 extends Exception> T execute(Class<X1> exceptionType, Class<X2> exceptionType2, TransactionalHostContextAccessor.Permission permission, Throwing2TransactionCallback<T,X1,X2> callback) throws X1 extends Exception, X2 extends Exception
TransactionalHostContextAccessor.Propagation.REQUIRED
.permission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeX1
- if it was thrown by the callbackX2
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X1 extends Exception
public <T,X1 extends Exception,X2 extends Exception> T execute(Class<X1> exceptionType, Class<X2> exceptionType2, TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, Throwing2TransactionCallback<T,X1,X2> callback) throws X1 extends Exception, X2 extends Exception
propagation
- the propagation mode to usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeX1
- if it was thrown by the callbackX2
- if it was thrown by the callbackRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.X1 extends Exception
Copyright © 2003–2020 Atlassian. All rights reserved.