Package com.atlassian.beehive.core
Interface ManagedClusterLock
- All Superinterfaces:
ClusterLock,Lock
Decorates a cluster lock with management concerns, such as its name and statistics.
- Since:
- v0.2
-
Method Summary
Methods inherited from interface com.atlassian.beehive.ClusterLock
isHeldByCurrentThread, lockInterruptibly, newCondition
-
Method Details
-
getName
Returns the name of this cluster lock. This is the same name that was supplied toClusterLockService.getLockForName(String).- Returns:
- the name of this cluster lock.
-
isLocked
boolean isLocked()- Returns:
trueif any thread on any node holds this lock andfalseotherwise
-
getStatistics
Returns the currently available statistics for this lock.Callers should generally make no assumptions about what statistics are available or what they mean, and this is likely to vary with the implementation.
- Returns:
- a map of statistics keys to their values, in no particular order
-
getClusterLockStatus
Returns the status of this lock.Callers must be aware that not all implementations can return a valid update time of the lock.
- Returns:
- a
ClusterLockStatusfor this lock
-