public abstract class AbstractWaitStrategy extends java.lang.Object implements WaitStrategy
Modifier and Type | Field and Description |
---|---|
protected java.time.Duration |
startupTimeout |
protected WaitStrategyTarget |
waitStrategyTarget |
Constructor and Description |
---|
AbstractWaitStrategy() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<java.lang.Integer> |
getLivenessCheckPorts() |
protected org.rnorth.ducttape.ratelimits.RateLimiter |
getRateLimiter() |
protected abstract void |
waitUntilReady()
Wait until
waitStrategyTarget has started. |
void |
waitUntilReady(WaitStrategyTarget waitStrategyTarget)
Wait until the target has started.
|
WaitStrategy |
withRateLimiter(org.rnorth.ducttape.ratelimits.RateLimiter rateLimiter)
Set the rate limiter being used
|
WaitStrategy |
withStartupTimeout(java.time.Duration startupTimeout)
Set the duration of waiting time until container treated as started.
|
protected WaitStrategyTarget waitStrategyTarget
@NonNull protected java.time.Duration startupTimeout
public void waitUntilReady(WaitStrategyTarget waitStrategyTarget)
waitUntilReady
in interface WaitStrategy
waitStrategyTarget
- the target of the WaitStrategyprotected abstract void waitUntilReady()
waitStrategyTarget
has started.public WaitStrategy withStartupTimeout(java.time.Duration startupTimeout)
withStartupTimeout
in interface WaitStrategy
startupTimeout
- timeoutWaitStrategy.waitUntilReady(WaitStrategyTarget)
protected java.util.Set<java.lang.Integer> getLivenessCheckPorts()
protected org.rnorth.ducttape.ratelimits.RateLimiter getRateLimiter()
public WaitStrategy withRateLimiter(org.rnorth.ducttape.ratelimits.RateLimiter rateLimiter)
rateLimiter
- rateLimiter