public class SimpleClusterLockService extends Object implements ManagedClusterLockService
Certain cross product libraries (eg SAL and AO) will depend on having an implementation of ClusterLockService, and this one can used by applications that only run as a single node.
| Constructor and Description |
|---|
SimpleClusterLockService() |
| Modifier and Type | Method and Description |
|---|---|
Collection<com.atlassian.beehive.simple.SingleNodeLock> |
getAllKnownClusterLocks()
Returns all the cluster locks that are currently known to this cluster lock service.
|
ClusterLock |
getLockForName(String lockName)
Returns the cluster-wide lock for the given name.
|
Collection<ClusterLockStatus> |
getStatusesOfAllHeldClusterLocks()
Returns lock status of every cluster lock being held.
|
public Collection<com.atlassian.beehive.simple.SingleNodeLock> getAllKnownClusterLocks()
ManagedClusterLockServiceThe specifics are mostly left up to the implementation, with the following caveats:
Consumers MUST NOT rely on this method for the correctness of their locking behaviour. This information is intended for instrumentation and other similar management concerns, only.
getAllKnownClusterLocks in interface ManagedClusterLockService@Nonnull public Collection<ClusterLockStatus> getStatusesOfAllHeldClusterLocks()
ManagedClusterLockServiceThis is intended to provide additional information about misbehaving locks and thus this method should return the most up-to-date and non-cached data.
Consumers must be aware that not all implementations can return a valid update time of the locks.
getStatusesOfAllHeldClusterLocks in interface ManagedClusterLockServicepublic ClusterLock getLockForName(@Nonnull String lockName)
ClusterLockServicegetLockForName in interface ClusterLockServicelockName - the globally unique lock identifierCopyright © 2019 Atlassian. All rights reserved.