org.apache.servicemix.common.locks.impl
Class SimpleLock
java.lang.Object
org.apache.servicemix.common.locks.impl.SimpleLock
- All Implemented Interfaces:
- java.io.Serializable, java.util.concurrent.locks.Lock
public class SimpleLock
- extends java.lang.Object
- implements java.util.concurrent.locks.Lock, java.io.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 java.util.concurrent.locks.Lock
tryLock
public boolean tryLock()
- Specified by:
tryLock in interface java.util.concurrent.locks.Lock
unlock
public void unlock()
- Specified by:
unlock in interface java.util.concurrent.locks.Lock
newCondition
public java.util.concurrent.locks.Condition newCondition()
- Specified by:
newCondition in interface java.util.concurrent.locks.Lock
isLocked
public boolean isLocked()
hasQueuedThreads
public boolean hasQueuedThreads()
lockInterruptibly
public void lockInterruptibly()
throws java.lang.InterruptedException
- Specified by:
lockInterruptibly in interface java.util.concurrent.locks.Lock
- Throws:
java.lang.InterruptedException
tryLock
public boolean tryLock(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Specified by:
tryLock in interface java.util.concurrent.locks.Lock
- Throws:
java.lang.InterruptedException
Copyright © 2005-2012 FuseSource. All Rights Reserved.