Class DenormalisedLockService
java.lang.Object
com.atlassian.confluence.security.denormalisedpermissions.impl.manage.DenormalisedLockService
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
public class DenormalisedLockService
extends Object
implements org.springframework.beans.factory.DisposableBean
Allows to acquire DB locks. Could be useful to prevent parallel execution.
- Since:
- 7.11.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDenormalisedLockService(com.atlassian.event.api.EventPublisher eventPublisher, org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidAcquires the lock.voiddestroy()getRecord(DenormalisedLockService.LockName lockName) voidinit()voidonApplicationStarted(ApplicationStartedEvent applicationStartedEvent)
-
Constructor Details
-
DenormalisedLockService
public DenormalisedLockService(com.atlassian.event.api.EventPublisher eventPublisher, org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager)
-
-
Method Details
-
init
@PostConstruct public void init() -
acquireLockForTransaction
Acquires the lock. Must be called from an existing transaction. Released automatically when the transaction finishes- Parameters:
lockName- the name of the lock
-
getRecord
-
onApplicationStarted
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-