Package org.jgroups.protocols
Class Locking.ClientLock
java.lang.Object
org.jgroups.protocols.Locking.ClientLock
- All Implemented Interfaces:
Lock
- Direct Known Subclasses:
PEER_LOCK.PeerLock
- Enclosing class:
Locking
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final Locking.ClientConditionprotected booleanprotected booleanprotected final Stringprotected Ownerprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_unlock(boolean force) protected voidacquire(boolean throwInterrupt) protected booleanacquireTryLock(long timeout, boolean use_timeout) protected voidhandleLockGrantedResponse(Owner owner, Address sender) voidlock()protected voidprotected voidvoidtoString()booleantryLock()booleanvoidunlock()
-
Field Details
-
name
-
owner
-
acquired
protected volatile boolean acquired -
denied
protected volatile boolean denied -
is_trylock
protected volatile boolean is_trylock -
timeout
protected long timeout -
condition
-
-
Constructor Details
-
ClientLock
-
-
Method Details
-
lock
public void lock() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
tryLock
public boolean tryLock() -
tryLock
- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
public void unlock() -
newCondition
- Specified by:
newConditionin interfaceLock
-
toString
-
lockGranted
protected void lockGranted() -
lockDenied
protected void lockDenied() -
handleLockGrantedResponse
-
acquire
- Throws:
InterruptedException
-
_unlock
protected void _unlock(boolean force) -
acquireTryLock
- Throws:
InterruptedException
-