Package com.qtsurfer.api.sdk.internal
Class Policies
java.lang.Object
com.qtsurfer.api.sdk.internal.Policies
Factory helpers that build Failsafe policies shared by every workflow stage.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> dev.failsafe.FailsafeExecutor<T>stagePoller(Duration pollInterval, Duration maxPollInterval, Duration stageTimeout, Predicate<T> retryWhile) Build a FailsafeExecutor that pollsfnwith exponential backoff while the result matchesretryWhile(expected to be anStatusNormalizer.Normalized.IN_PROGRESScheck).
-
Method Details
-
stagePoller
public static <T> dev.failsafe.FailsafeExecutor<T> stagePoller(Duration pollInterval, Duration maxPollInterval, Duration stageTimeout, Predicate<T> retryWhile) Build a FailsafeExecutor that pollsfnwith exponential backoff while the result matchesretryWhile(expected to be anStatusNormalizer.Normalized.IN_PROGRESScheck). Exceptions are never retried — they propagate so the caller can map them to the appropriateQTSErrorsubclass.
-