public final class DummyConcurrentLock extends Object implements java.util.concurrent.locks.Lock
ReentrantLock
to disable lockingModifier and Type | Field and Description |
---|---|
static DummyConcurrentLock |
INSTANCE
a default instance, can be always used, as this
Lock is stateless. |
Constructor and Description |
---|
DummyConcurrentLock() |
Modifier and Type | Method and Description |
---|---|
void |
lock() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long time,
TimeUnit unit) |
void |
unlock() |
public static final DummyConcurrentLock INSTANCE
Lock
is stateless.public void lock()
lock
in interface java.util.concurrent.locks.Lock
public void lockInterruptibly()
lockInterruptibly
in interface java.util.concurrent.locks.Lock
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
public boolean tryLock(long time, TimeUnit unit)
tryLock
in interface java.util.concurrent.locks.Lock
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
public java.util.concurrent.locks.Condition newCondition()
newCondition
in interface java.util.concurrent.locks.Lock