Package com.atlassian.plugin.util
Class WaitUntil
java.lang.Object
com.atlassian.plugin.util.WaitUntil
Utility methods for synchronising on asynchronous processes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe condition to determine when to stop waiting -
Method Summary
Modifier and TypeMethodDescriptionstatic booleaninvoke(WaitUntil.WaitCondition waitCondition) Invokes the wait condition, trying every second for 10 secondsstatic booleaninvoke(WaitUntil.WaitCondition waitCondition, int tries) Invokes the wait condition, trying every second for the configured secondsstatic booleaninvoke(WaitUntil.WaitCondition waitCondition, int time, TimeUnit unit, int retryInterval) Invokes the wait condition, trying every second for the configured seconds
-
Method Details
-
invoke
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
Invokes the wait condition, trying every second for the configured seconds- Parameters:
waitCondition- The condition that determines when to stop waitingtries- 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 waitingtime- the amount of time to waitunit- the time unit time is specified inretryInterval- how often to re-check the condition (specified in the supplied TimeUnit)- Returns:
- True if the condition returned true
-