protected class Locking.ClientLock extends Object implements Lock
Lock
. This is a client stub communicates with a server equivalent. The semantics are
more or less those of Lock
, but may differ slightly.
For details see LockService
.Modifier and Type | Field and Description |
---|---|
protected boolean |
acquired |
protected Locking.ClientCondition |
condition |
protected boolean |
denied |
protected boolean |
is_trylock |
protected int |
lock_id |
protected String |
name |
protected Owner |
owner |
protected long |
timeout |
Constructor and Description |
---|
Locking.ClientLock(String name) |
Locking.ClientLock(String name,
Owner owner) |
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(int lock_id) |
void |
lock() |
protected void |
lockDenied(int lock_id) |
protected void |
lockGranted(int lock_id) |
void |
lockInterruptibly() |
Condition |
newCondition() |
String |
toString() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
protected final 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
protected final int lock_id
public Locking.ClientLock(String name)
public void lockInterruptibly() throws InterruptedException
lockInterruptibly
in interface Lock
InterruptedException
public boolean tryLock(long time, TimeUnit unit) throws InterruptedException
tryLock
in interface Lock
InterruptedException
public Condition newCondition()
newCondition
in interface Lock
protected void lockGranted(int lock_id)
protected void lockDenied(int lock_id)
protected void handleLockGrantedResponse(int lock_id)
protected void acquire(boolean throwInterrupt) throws InterruptedException
InterruptedException
protected void _unlock(boolean force)
protected boolean acquireTryLock(long timeout, boolean use_timeout) throws InterruptedException
InterruptedException
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.