public class MockClusterLockDao extends Object implements ClusterLockDao
| Modifier and Type | Field and Description |
|---|---|
ConcurrentHashMap<String,ClusterLockStatus> |
locks |
| Constructor and Description |
|---|
MockClusterLockDao(String nodeId) |
| Modifier and Type | Method and Description |
|---|---|
List<ClusterLockStatus> |
getAllHeldClusterLocks() |
ClusterLockStatus |
getClusterLockStatusByName(String lockName) |
void |
insertEmptyClusterLock(String lockName) |
void |
releaseLocksHeldByNode() |
void |
renewLease(String lockName) |
boolean |
tryAcquireLock(String lockName) |
void |
unlock(String lockName) |
public final ConcurrentHashMap<String,ClusterLockStatus> locks
public MockClusterLockDao(String nodeId)
@Nonnull public List<ClusterLockStatus> getAllHeldClusterLocks()
getAllHeldClusterLocks in interface ClusterLockDaopublic ClusterLockStatus getClusterLockStatusByName(@Nonnull String lockName)
getClusterLockStatusByName in interface ClusterLockDaopublic boolean tryAcquireLock(@Nonnull String lockName)
tryAcquireLock in interface ClusterLockDaopublic void insertEmptyClusterLock(@Nonnull String lockName)
insertEmptyClusterLock in interface ClusterLockDaopublic void unlock(@Nonnull String lockName)
unlock in interface ClusterLockDaopublic void releaseLocksHeldByNode()
releaseLocksHeldByNode in interface ClusterLockDaopublic void renewLease(@Nonnull String lockName)
renewLease in interface ClusterLockDaoCopyright © 2019 Atlassian. All rights reserved.