Class WaitUntil

java.lang.Object
com.atlassian.plugin.util.WaitUntil

public class WaitUntil extends Object
Utility methods for synchronising on asynchronous processes
  • Method Details

    • invoke

      public static boolean invoke(WaitUntil.WaitCondition waitCondition)
      Invokes the wait condition, trying every second for 10 seconds
      Parameters:
      waitCondition - The condition that determines when to stop waiting
      Returns:
      True if the condition returned true
    • invoke

      public static boolean invoke(WaitUntil.WaitCondition waitCondition, int tries)
      Invokes the wait condition, trying every second for the configured seconds
      Parameters:
      waitCondition - The condition that determines when to stop waiting
      tries - The number of tries to attempt
      Returns:
      True if the condition returned true
    • invoke

      public static boolean invoke(WaitUntil.WaitCondition waitCondition, int time, TimeUnit unit, int retryInterval)
      Invokes the wait condition, trying every second for the configured seconds
      Parameters:
      waitCondition - The condition that determines when to stop waiting
      time - the amount of time to wait
      unit - the time unit time is specified in
      retryInterval - how often to re-check the condition (specified in the supplied TimeUnit)
      Returns:
      True if the condition returned true