WaitStrategy class abstract

Abstract base class for all wait strategies.

Provides:

Concrete subclasses must implement waitUntilReady.

Example:

final strategy = PortWaitStrategy(8080)
  ..withStartupTimeout(const Duration(seconds: 30))
  ..withPollInterval(const Duration(milliseconds: 500));
await strategy.waitUntilReady(container);
Implementers

Constructors

WaitStrategy()

Properties

hashCode int
The hash code for this object.
no setterinherited
pollInterval Duration
Time between successive polling attempts.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startupTimeout Duration
Maximum time to wait for the container to become ready.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
poll(Future<bool> check(), {List<Type>? transientExceptions}) Future<bool>
Adaptive polling loop.
toString() String
A string representation of this object.
inherited
waitUntilReady(WaitStrategyTarget target) Future<void>
Waits until the container described by target is ready.
withPollInterval(Duration interval) WaitStrategy
Sets the poll interval between readiness checks.
withStartupTimeout(Duration timeout) WaitStrategy
Sets the maximum startup timeout.
withTransientExceptions(List<Type> exceptions) WaitStrategy
Adds exceptions to the set of exception types that are treated as transient failures during polling.

Operators

operator ==(Object other) bool
The equality operator.
inherited