public class LockFactoryAdapter extends java.lang.Object implements LockFactory
| Modifier and Type | Class and Description |
|---|---|
class |
LockFactoryAdapter.LockAdapter |
LockFactory.Lock| Constructor and Description |
|---|
LockFactoryAdapter(java.util.concurrent.locks.Lock delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected LockFactory.Lock |
createLock() |
LockFactory.Lock |
lock() |
LockFactory.Lock |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
LockFactory.Lock |
tryLock() |
LockFactory.Lock |
tryLock(Duration timeout) |
LockFactory.Lock |
tryLock(long time,
java.util.concurrent.TimeUnit unit) |
public LockFactoryAdapter(@Nonnull
java.util.concurrent.locks.Lock delegate)
@Nonnull protected LockFactory.Lock createLock()
@Nonnull public LockFactory.Lock lock()
lock in interface LockFactory@Nonnull public LockFactory.Lock lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly in interface LockFactoryjava.lang.InterruptedException@Nullable public LockFactory.Lock tryLock()
tryLock in interface LockFactorynull if it is not possible to acquire the lock. Causes could be that another thread currently already holds the lock.@Nullable public LockFactory.Lock tryLock(@Nonnegative long time, @Nonnull java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock in interface LockFactorynull if it is not possible to acquire the lock within the given timeout. Causes could be that another thread currently already holds the lock.java.lang.InterruptedException@Nullable public LockFactory.Lock tryLock(@Nonnull Duration timeout) throws java.lang.InterruptedException
tryLock in interface LockFactorynull if it is not possible to acquire the lock within the given timeout. Causes could be that another thread currently already holds the lock.java.lang.InterruptedException@Nonnull public java.util.concurrent.locks.Condition newCondition()
newCondition in interface LockFactoryCopyright © 2013 echocat. All Rights Reserved.