public class DatabaseClusterLockService extends Object implements ManagedClusterLockService
This implementation relies on the host application providing SPI implementations for Data Access objects.
Applications whose dependency injection container does not support the JSR-250PostConstruct annotation will need to explicitly invoke
the cleanUpOrphanLocks() method upon startup or the first lock attempt.| Constructor and Description |
|---|
DatabaseClusterLockService(ClusterLockDao clusterLockDao,
ClusterNodeHeartbeatService clusterNodeHeartbeatService) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUpOrphanLocks() |
Collection<com.atlassian.beehive.db.DatabaseClusterLock> |
getAllKnownClusterLocks() |
ClusterLock |
getLockForName(String lockName) |
Collection<ClusterLockStatus> |
getStatusesOfAllHeldClusterLocks() |
public DatabaseClusterLockService(ClusterLockDao clusterLockDao, ClusterNodeHeartbeatService clusterNodeHeartbeatService)
public Collection<com.atlassian.beehive.db.DatabaseClusterLock> getAllKnownClusterLocks()
getAllKnownClusterLocks in interface ManagedClusterLockService@Nonnull public Collection<ClusterLockStatus> getStatusesOfAllHeldClusterLocks()
getStatusesOfAllHeldClusterLocks in interface ManagedClusterLockServicepublic ClusterLock getLockForName(@Nonnull String lockName)
getLockForName in interface ClusterLockService@PostConstruct public void cleanUpOrphanLocks()
Copyright © 2018 Atlassian. All rights reserved.