Class TimeoutExecutor<R>

java.lang.Object
dev.failsafe.spi.PolicyExecutor<R>
dev.failsafe.internal.TimeoutExecutor<R>
Type Parameters:
R - result type

public class TimeoutExecutor<R> extends PolicyExecutor<R>
A PolicyExecutor that handles failures according to a Timeout.

Timeouts are scheduled to occur in a separate thread. When exceeded, a TimeoutExceededException is recorded as the execution result. If another result is recorded before the timeout is exceeded, any pending timeouts are cancelled.