Modifier and Type | Field and Description |
---|---|
static NoOpLock |
INSTANCE
As there is no instance state then this object can be used to save on allocation.
|
Constructor and Description |
---|
NoOpLock() |
Modifier and Type | Method and Description |
---|---|
void |
lock()
Proceeds as if the lock has been acquired.
|
void |
lockInterruptibly()
Proceeds as if the lock has been acquired.
|
Condition |
newCondition()
Not supported.
|
boolean |
tryLock()
Always succeeds.
|
boolean |
tryLock(long time,
TimeUnit unit)
Always succeeds.
|
void |
unlock()
The lock has never been taken so no effect.
|
public static final NoOpLock INSTANCE
public void lock()
public void lockInterruptibly()
lockInterruptibly
in interface Lock
public boolean tryLock()
public boolean tryLock(long time, TimeUnit unit)
public void unlock()
public Condition newCondition()
newCondition
in interface Lock
UnsupportedOperationException
- always.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.