org.ow2.util.pool.impl.enhanced.impl.waitcontrol
Class NoWaitControl

java.lang.Object
  extended by org.ow2.util.pool.impl.enhanced.impl.waitcontrol.NoWaitControl
All Implemented Interfaces:
IWaitControl

public class NoWaitControl
extends java.lang.Object
implements IWaitControl

Author:
Gael Lalire

Field Summary
static NoWaitControl INSTANCE
           
 
Constructor Summary
protected NoWaitControl()
           
 
Method Summary
 boolean canContinueToWait()
           
 void popWaitAuthorization()
           
 void pushWaitAuthorization(WaitAuthorization waitAuthorization)
           
 void verifyInterrupted()
          This method throw an exception only if on waitOnXXX throw an exception before.
 boolean waitOnCondition(java.util.concurrent.locks.Condition condition)
           
 boolean waitOnConditionWaitPart(IConditionWaitPart condition)
           
 boolean waitOnMutex(java.lang.Object mutex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NoWaitControl INSTANCE
Constructor Detail

NoWaitControl

protected NoWaitControl()
Method Detail

popWaitAuthorization

public void popWaitAuthorization()
Specified by:
popWaitAuthorization in interface IWaitControl

pushWaitAuthorization

public void pushWaitAuthorization(WaitAuthorization waitAuthorization)
Specified by:
pushWaitAuthorization in interface IWaitControl

waitOnCondition

public boolean waitOnCondition(java.util.concurrent.locks.Condition condition)
                        throws java.lang.InterruptedException,
                               WaiterInterruptedException
Specified by:
waitOnCondition in interface IWaitControl
Parameters:
condition - a condition
Returns:
false if timeout, true if notify
Throws:
java.lang.InterruptedException
WaiterInterruptedException

waitOnMutex

public boolean waitOnMutex(java.lang.Object mutex)
                    throws java.lang.InterruptedException,
                           WaiterInterruptedException
Specified by:
waitOnMutex in interface IWaitControl
Returns:
false if timeout, true if notify
Throws:
java.lang.InterruptedException
WaiterInterruptedException

canContinueToWait

public boolean canContinueToWait()
Specified by:
canContinueToWait in interface IWaitControl
Returns:
false if timeout

waitOnConditionWaitPart

public boolean waitOnConditionWaitPart(IConditionWaitPart condition)
                                throws java.lang.InterruptedException,
                                       WaiterInterruptedException
Specified by:
waitOnConditionWaitPart in interface IWaitControl
Parameters:
condition - a condition
Returns:
false if timeout, true if notify
Throws:
java.lang.InterruptedException
WaiterInterruptedException

verifyInterrupted

public void verifyInterrupted()
                       throws WaiterInterruptedException
Description copied from interface: IWaitControl
This method throw an exception only if on waitOnXXX throw an exception before. If popWaitAuthorization was called the exception may not be thrown again.

Specified by:
verifyInterrupted in interface IWaitControl
Throws:
WaiterInterruptedException


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.