Class StopWait

java.lang.Object
org.oddjob.framework.util.StopWait

public class StopWait extends Object
A utility class to provide wait until stopped functionality.

The default timeout is 5 seconds before a FailedToStopException is thrown.

Author:
rob
  • Constructor Details

    • StopWait

      public StopWait(Stateful stateful)
      Constructor with default timeout.
      Parameters:
      stateful - The thing to wait until stopped.
    • StopWait

      public StopWait(Stateful stateful, long timeout)
      Constructor where timeout can be specified.
      Parameters:
      stateful - The thing to wait until stopped.
      timeout - The timeout. Note that a timeout of 0 or less is no timeout.
  • Method Details