com.atlassian.beehive
Interface ClusterLock

All Superinterfaces:
Lock

@PublicApi
public interface ClusterLock
extends Lock

Represents a cluster-wide lock.

These are named locks available from com.atlassian.beehive.ClusterLockService.

See Also:
Lock

Method Summary
 boolean isHeldByCurrentThread()
          Queries if this lock is held by the current thread.
 Condition newCondition()
          This optional operation from the java Lock interface is not supported in ClusterLock.
 
Methods inherited from interface java.util.concurrent.locks.Lock
lock, lockInterruptibly, tryLock, tryLock, unlock
 

Method Detail

isHeldByCurrentThread

boolean isHeldByCurrentThread()
Queries if this lock is held by the current thread.

This is equivalent to Thread.holdsLock(Object) for Java's intrinsic monitor locks or ReentrantLock.isHeldByCurrentThread().

Returns:
true if the current thread holds this lock; false otherwise

newCondition

@Nonnull
Condition newCondition()
This optional operation from the java Lock interface is not supported in ClusterLock.

Specified by:
newCondition in interface Lock
Returns:
never
Throws:
UnsupportedOperationException - always


Copyright © 2014 Atlassian. All Rights Reserved.