protected class LockService.LockImpl extends Object implements Lock
| Modifier and Type | Field and Description |
|---|---|
protected AtomicReference<Thread> |
holder |
protected String |
name |
| Constructor and Description |
|---|
LockService.LockImpl(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
lock() |
void |
lockInterruptibly() |
Condition |
newCondition()
This condition object is only allowed to work 1 for each lock.
|
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
protected final String name
protected final AtomicReference<Thread> holder
public LockService.LockImpl(String name)
public void lockInterruptibly()
throws InterruptedException
lockInterruptibly in interface LockInterruptedExceptionpublic boolean tryLock(long time,
TimeUnit unit)
throws InterruptedException
tryLock in interface LockInterruptedExceptionpublic Condition newCondition()
newCondition in interface LockCopyright © 2012 JBoss by Red Hat. All Rights Reserved.