org.apache.ojb.otm.lock.wait
Class TimeoutStrategy

java.lang.Object
  extended by org.apache.ojb.otm.lock.wait.TimeoutStrategy
All Implemented Interfaces:
LockWaitStrategy

public class TimeoutStrategy
extends Object
implements LockWaitStrategy


Constructor Summary
TimeoutStrategy()
          The default timeout is 30 seconds
TimeoutStrategy(long timeout)
           
 
Method Summary
 void waitForLock(ObjectLock lock, Transaction tx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeoutStrategy

public TimeoutStrategy(long timeout)
Parameters:
timeout - the number of milliseconds to wait before throwing exception

TimeoutStrategy

public TimeoutStrategy()
The default timeout is 30 seconds

Method Detail

waitForLock

public void waitForLock(ObjectLock lock,
                        Transaction tx)
                 throws LockingException
Specified by:
waitForLock in interface LockWaitStrategy
Parameters:
lock - The lock that the tx is waiting for
tx - The waiting tx
Throws:
LockingException
See Also:
LockWaitStrategy.waitForLock(ObjectLock, Transaction)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.