ProgramixGenericLib v5.0.1

com.programix.thread.ix
Class WaiterIx.Condition

java.lang.Object
  extended by com.programix.thread.ix.WaiterIx.Condition
Enclosing class:
WaiterIx

public class WaiterIx.Condition
extends Object

Used to associate additional conditions on an existing WaiterIx.

Author:
Paul Hyde

Method Summary
 WaiterIx getOwner()
          Returns the WaiterIx that owns this condition.
 boolean isFalse()
          Returns true if the expression specified at construction currently evaluates to false.
 boolean isTrue()
          Returns true if the expression specified at construction currently evaluates to true.
 void waitUntilTrue()
          Waits (for an unlimited amount of time) for the supplied expression to evaluate to true.
 boolean waitUntilTrue(long msTimeout)
          Waits (up to a maximum amount of time) for the supplied expression to evaluate to true.
 void waitUntilTrueWithTimedOutException(long msTimeout)
          Waits (up to a maximum amount of time) for the supplied expression to evaluate to true.
 void waitWhileTrue()
          Waits (for an unlimited amount of time) for the supplied expression to evaluate to false.
 boolean waitWhileTrue(long msTimeout)
          Waits (up to a maximum amount of time) for the supplied expression to evaluate to false.
 void waitWhileTrueWithTimedOutException(long msTimeout)
          Waits (up to a maximum amount of time) for the supplied expression to evaluate to false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isTrue

public boolean isTrue()
               throws ShutdownException
Returns true if the expression specified at construction currently evaluates to true.

Throws:
ShutdownException - if already shutdown.

isFalse

public boolean isFalse()
                throws ShutdownException
Returns true if the expression specified at construction currently evaluates to false.

Throws:
ShutdownException - if already shutdown.

waitUntilTrue

public boolean waitUntilTrue(long msTimeout)
                      throws InterruptedException,
                             ShutdownException
Waits (up to a maximum amount of time) for the supplied expression to evaluate to true. Uses a return value to signal whether or not a timeout occurred. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
ShutdownException

waitUntilTrue

public void waitUntilTrue()
                   throws InterruptedException,
                          ShutdownException
Waits (for an unlimited amount of time) for the supplied expression to evaluate to true. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
ShutdownException

waitUntilTrueWithTimedOutException

public void waitUntilTrueWithTimedOutException(long msTimeout)
                                        throws InterruptedException,
                                               TimedOutException,
                                               ShutdownException
Waits (up to a maximum amount of time) for the supplied expression to evaluate to true. Throws TimedOutException to signal that a timeout occurred. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
TimedOutException
ShutdownException

waitWhileTrue

public boolean waitWhileTrue(long msTimeout)
                      throws InterruptedException,
                             ShutdownException
Waits (up to a maximum amount of time) for the supplied expression to evaluate to false. Uses a return value to signal whether or not a timeout occurred. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
ShutdownException

waitWhileTrue

public void waitWhileTrue()
                   throws InterruptedException,
                          ShutdownException
Waits (for an unlimited amount of time) for the supplied expression to evaluate to false. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
ShutdownException

waitWhileTrueWithTimedOutException

public void waitWhileTrueWithTimedOutException(long msTimeout)
                                        throws InterruptedException,
                                               TimedOutException,
                                               ShutdownException
Waits (up to a maximum amount of time) for the supplied expression to evaluate to false. Throws TimedOutException to signal that a timeout occurred. See the Universal Behavior section in the class-level documentation of WaiterIx for details about the timeouts, return values, exceptions potentially thrown, and other general behavior.

Throws:
InterruptedException
TimedOutException
ShutdownException

getOwner

public WaiterIx getOwner()
Returns the WaiterIx that owns this condition.


ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.