public class DatabaseClusterLockService extends Object implements ClusterLockService
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.SimpleClusterLockService
Constructor and Description |
---|
DatabaseClusterLockService(ClusterLockDao clusterLockDao,
ClusterNodeHeartBeatDao clusterNodeHeartBeatDao) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUpOrphanLocks() |
ClusterLock |
getLockForName(String lockName)
Returns the cluster-wide lock for the given name.
|
public DatabaseClusterLockService(ClusterLockDao clusterLockDao, ClusterNodeHeartBeatDao clusterNodeHeartBeatDao)
@PostConstruct public void cleanUpOrphanLocks()
public ClusterLock getLockForName(@Nonnull String lockName)
ClusterLockService
getLockForName
in interface ClusterLockService
lockName
- the globally unique lock identifierCopyright © 2014 Atlassian. All Rights Reserved.