org.helidb.util.concurrent
Class AbstractLockAdapter
java.lang.Object
org.helidb.util.concurrent.AbstractLockAdapter
- All Implemented Interfaces:
- Lock
public abstract class AbstractLockAdapter
- extends Object
- implements Lock
This class can be used as the base of an implementation of a Lock
adapter. It implements all methods in the Lock
interface to throw
UnsupportedOperationException
. Subclasses override the methods that
they want to change the behavior of.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- helidb-core
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLockAdapter
public AbstractLockAdapter()
newCondition
public Condition newCondition()
- Specified by:
newCondition
in interface Lock
tryLock
public boolean tryLock()
- Specified by:
tryLock
in interface Lock
tryLock
public boolean tryLock(long time,
TimeUnit unit)
- Specified by:
tryLock
in interface Lock
lock
public void lock()
- Specified by:
lock
in interface Lock
lockInterruptibly
public void lockInterruptibly()
- Specified by:
lockInterruptibly
in interface Lock
unlock
public void unlock()
- Specified by:
unlock
in interface Lock