Class DenormalisedLockService
java.lang.Object
com.atlassian.confluence.security.denormalisedpermissions.impl.manage.DenormalisedLockService
Allows to acquire DB locks. Could be useful to prevent parallel execution.
- Since:
- 7.11.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDenormalisedLockService
(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Acquires the lock.void
When the service is starting up for the first time, we need to create "state records".getRecord
(DenormalisedLockService.LockName lockName) void
onApplicationStarted
(ApplicationStartedEvent applicationStartedEvent)
-
Constructor Details
-
DenormalisedLockService
public DenormalisedLockService(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.PlatformTransactionManager transactionManager)
-
-
Method Details
-
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
-
createAllLockRecordsIfTheyDoNotExist
When the service is starting up for the first time, we need to create "state records". It's important to do this in separate transaction because these records will be used for cluster-wide locking.
-