org.apache.servicemix.common.locks.impl
Class SimpleLock
java.lang.Object
org.apache.servicemix.common.locks.impl.SimpleLock
- All Implemented Interfaces:
- Serializable, Lock
public class SimpleLock
- extends Object
- implements Lock, Serializable
- Author:
- lhein
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLock
public SimpleLock()
lock
public void lock()
- Specified by:
lock in interface Lock
tryLock
public boolean tryLock()
- Specified by:
tryLock in interface Lock
unlock
public void unlock()
- Specified by:
unlock in interface Lock
newCondition
public Condition newCondition()
- Specified by:
newCondition in interface Lock
isLocked
public boolean isLocked()
hasQueuedThreads
public boolean hasQueuedThreads()
lockInterruptibly
public void lockInterruptibly()
throws InterruptedException
- Specified by:
lockInterruptibly in interface Lock
- Throws:
InterruptedException
tryLock
public boolean tryLock(long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
tryLock in interface Lock
- Throws:
InterruptedException
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.