public interface TransactionalHostContextAccessor
extends com.atlassian.sal.spi.HostContextAccessor
Modifier and Type | Interface and Description |
---|---|
static class |
TransactionalHostContextAccessor.Permission
Transaction permission
|
static class |
TransactionalHostContextAccessor.Propagation
Transaction propagation, equivalent to the corresponding values of javax.ejb.TransactionAttributeType
|
Modifier and Type | Method and Description |
---|---|
<T> T |
doInTransaction(TransactionalHostContextAccessor.Permission permission,
com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Runs an action in a transaction and returns a optional value.
|
<T> T |
doInTransaction(TransactionalHostContextAccessor.Propagation propagation,
com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Runs an action in a transaction and returns a optional value.
|
<T> T |
doInTransaction(TransactionalHostContextAccessor.Propagation propagation,
TransactionalHostContextAccessor.Permission permission,
com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Runs an action in a transaction and returns a optional value.
|
<T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
propagation
- the propagation mode to usecallback
- The callback class to executeRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.<T> T doInTransaction(TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor.Propagation.REQUIRED
.permission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.<T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
propagation
- the propagation mode to usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeRuntimeException
- if anything went wrong. The caller will be responsible for rolling back.Copyright © 2003–2017 Atlassian. All rights reserved.