protected class Locking.ClientLock
extends java.lang.Object
implements java.util.concurrent.locks.Lock
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
acquired |
protected Locking.ClientCondition |
condition |
protected boolean |
denied |
protected boolean |
is_trylock |
protected java.lang.String |
name |
protected Owner |
owner |
protected long |
timeout |
| Constructor and Description |
|---|
ClientLock(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_unlock(boolean force) |
protected void |
acquire(boolean throwInterrupt) |
protected boolean |
acquireTryLock(long timeout,
boolean use_timeout) |
protected void |
handleLockGrantedResponse(Owner owner,
Address sender) |
void |
lock() |
protected void |
lockDenied() |
protected void |
lockGranted() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
java.lang.String |
toString() |
boolean |
tryLock() |
boolean |
tryLock(long time,
java.util.concurrent.TimeUnit unit) |
void |
unlock() |
protected final java.lang.String name
protected Owner owner
protected volatile boolean acquired
protected volatile boolean denied
protected volatile boolean is_trylock
protected long timeout
protected final Locking.ClientCondition condition
public void lock()
lock in interface java.util.concurrent.locks.Lockpublic void lockInterruptibly()
throws java.lang.InterruptedException
lockInterruptibly in interface java.util.concurrent.locks.Lockjava.lang.InterruptedExceptionpublic boolean tryLock()
tryLock in interface java.util.concurrent.locks.Lockpublic boolean tryLock(long time,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
tryLock in interface java.util.concurrent.locks.Lockjava.lang.InterruptedExceptionpublic void unlock()
unlock in interface java.util.concurrent.locks.Lockpublic java.util.concurrent.locks.Condition newCondition()
newCondition in interface java.util.concurrent.locks.Lockpublic java.lang.String toString()
toString in class java.lang.Objectprotected void lockGranted()
protected void lockDenied()
protected void acquire(boolean throwInterrupt)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void _unlock(boolean force)
protected boolean acquireTryLock(long timeout,
boolean use_timeout)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionCopyright ? 1998-2009 Bela Ban / Red Hat. All Rights Reserved.