public class ConfluenceSpringHostContextAccessor extends com.atlassian.sal.spring.component.SpringHostContextAccessor implements TransactionalHostContextAccessor
TransactionalHostContextAccessor.Permission, TransactionalHostContextAccessor.Propagation
Constructor and Description |
---|
ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager,
VCacheRequestContextOperations vCacheRequestContextOperations) |
Modifier and Type | Method and Description |
---|---|
Object |
doInTransaction(com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback callback) |
<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.
|
getComponentsOfType, getTransactionDefinition, setApplicationContext
public ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager, VCacheRequestContextOperations vCacheRequestContextOperations)
public <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
doInTransaction
in interface TransactionalHostContextAccessor
propagation
- the propagation mode to usecallback
- The callback class to executepublic <T> T doInTransaction(TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
TransactionalHostContextAccessor.Propagation.REQUIRED
.doInTransaction
in interface TransactionalHostContextAccessor
permission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executepublic <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
doInTransaction
in interface TransactionalHostContextAccessor
propagation
- the propagation mode to usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executepublic Object doInTransaction(com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback callback)
doInTransaction
in interface com.atlassian.sal.spi.HostContextAccessor
doInTransaction
in class com.atlassian.sal.spring.component.SpringHostContextAccessor
Copyright © 2003–2021 Atlassian. All rights reserved.