public class

WaitUntil

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

Class Overview

Utility methods for synchronising on asynchronous processes

Summary

Nested Classes
interface WaitUntil.WaitCondition The condition to determine when to stop waiting  
Public Methods
static boolean invoke(WaitUntil.WaitCondition waitCondition)
Invokes the wait condition, trying every second for 10 seconds
static boolean invoke(WaitUntil.WaitCondition waitCondition, int time, TimeUnit unit, int retryInterval)
Invokes the wait condition, trying every second for the configured seconds
static boolean invoke(WaitUntil.WaitCondition waitCondition, int tries)
Invokes the wait condition, trying every second for the configured seconds
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

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

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

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