org.apache.openejb.core.stateful
Class DefaultLockFactory.DefaultLock

java.lang.Object
  extended by org.apache.openejb.core.stateful.DefaultLockFactory.DefaultLock
All Implemented Interfaces:
LockFactory.StatefulLock
Enclosing class:
DefaultLockFactory

public static class DefaultLockFactory.DefaultLock
extends Object
implements LockFactory.StatefulLock


Constructor Summary
DefaultLockFactory.DefaultLock()
           
 
Method Summary
 boolean isHeldByCurrentThread()
           
 void lock()
           
 boolean tryLock()
           
 boolean tryLock(long time, TimeUnit unit)
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLockFactory.DefaultLock

public DefaultLockFactory.DefaultLock()
Method Detail

lock

public void lock()
Specified by:
lock in interface LockFactory.StatefulLock

unlock

public void unlock()
Specified by:
unlock in interface LockFactory.StatefulLock

isHeldByCurrentThread

public boolean isHeldByCurrentThread()
Specified by:
isHeldByCurrentThread in interface LockFactory.StatefulLock

tryLock

public boolean tryLock()
Specified by:
tryLock in interface LockFactory.StatefulLock

tryLock

public boolean tryLock(long time,
                       TimeUnit unit)
                throws InterruptedException
Specified by:
tryLock in interface LockFactory.StatefulLock
Throws:
InterruptedException


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.