Package io.ryos.rhino.sdk.dsl
Interface RetriableDsl<R extends MeasurableDsl,T>
-
- Type Parameters:
R
- Return type.T
- Predicate's type.
- All Superinterfaces:
DslItem
,MaterializableDsl
,MaterializableDslItem
- All Known Subinterfaces:
HttpDsl
- All Known Implementing Classes:
HttpDslImpl
public interface RetriableDsl<R extends MeasurableDsl,T> extends MaterializableDslItem
Retriable spec is the DSL spec which is to be retried if predicate turns true.- Since:
- 1.1.0
- Author:
- Erhan Bagdemir
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
retryIf(java.util.function.Predicate<T> predicate, int numOfRetries)
Retries, if the predicate is true and the current attempt less then numOfRetries.-
Methods inherited from interface io.ryos.rhino.sdk.dsl.DslItem
getChildren, getName, getParent, getParentName, hasParent, setName, setParent
-
Methods inherited from interface io.ryos.rhino.sdk.dsl.MaterializableDsl
materializer
-
-
-
-
Method Detail
-
retryIf
R retryIf(java.util.function.Predicate<T> predicate, int numOfRetries)
Retries, if the predicate is true and the current attempt less then numOfRetries.- Parameters:
predicate
- If predicate turns true, then the spec will be repeated.numOfRetries
- Number of retries.- Returns:
- The spec instance which is to be repeated.
-
-