public interface Waiter
| Modifier and Type | Interface and Description |
|---|---|
static class |
Waiter.LogPoint
Object for configurable conditional logging of waiting.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_INTERVAL |
| Modifier and Type | Method and Description |
|---|---|
default Waiter |
failFast(FailFastCheck failFast)
Sets waiters fail fast function that indicates (returns true) if there is an error state and waiting should not
proceed.
|
Waiter |
interval(long millis)
Sets waiter conditions check interval.
|
Waiter |
interval(TimeUnit timeUnit,
long t)
Sets waiter conditions check interval.
|
default Waiter |
level(org.slf4j.event.Level level)
Set the level of severity for a log message.
|
Waiter |
logPoint(Waiter.LogPoint logPoint)
Sets waiters logPoints.
|
default Waiter |
onFailure(Runnable runnable)
Sets waiters failed awaiting execution.
|
default Waiter |
onIteration(Runnable runnable)
Sets waiters execution for each iteration.
|
default Waiter |
onSuccess(Runnable runnable)
Sets waiters successful awaiting execution.
|
default Waiter |
onTimeout(Runnable runnable)
Sets waiters timed out awaiting execution.
|
Waiter |
reason(String reason)
Sets waiting reason.
|
Waiter |
timeout(long millis)
Sets waiter timeout after which waiters stops waiting.
|
Waiter |
timeout(TimeUnit timeUnit,
long t)
Sets waiter timeout after which waiters stops waiting.
|
boolean |
waitFor()
Waits till condition is met.
|
static final long DEFAULT_INTERVAL
Waiter timeout(long millis)
logPoint(LogPoint) to anything else then
Waiter.LogPoint.NONEmillis - timeout in millisecondsWaiter timeout(TimeUnit timeUnit, long t)
logPoint(LogPoint) to anything else then
Waiter.LogPoint.NONEtimeUnit - timeUnit that is converts time t to millisecondst - timeout in timeUnitWaiter interval(long millis)
millis - interval in millisecondsWaiter interval(TimeUnit timeUnit, long t)
timeUnit - timeUnit that is converts time t to millisecondst - interval in millisecondsWaiter reason(String reason)
reason - what the waiters what upon.Waiter logPoint(Waiter.LogPoint logPoint)
logPoint - what points of waiting should be logged.Waiter.LogPointdefault Waiter level(org.slf4j.event.Level level)
level - what level of severity should be used to log the message.Leveldefault Waiter onIteration(Runnable runnable)
runnable - code to be executed upon successful waiting.default Waiter onSuccess(Runnable runnable)
runnable - code to be executed upon successful waiting.default Waiter onFailure(Runnable runnable)
runnable - code to be executed upon failed waiting.default Waiter onTimeout(Runnable runnable)
runnable - code to be executed upon timed out waiting.default Waiter failFast(FailFastCheck failFast)
failFast - returns true if waiting has failed.boolean waitFor()
WaiterException - in case of timeoutCopyright © 2021. All rights reserved.