- java.lang.Object
-
- vertxval.core.AbstractVal<io.vavr.Tuple4<A,B,C,D>>
-
- vertxval.exp.Quadruple<A,B,C,D>
-
- All Implemented Interfaces:
Supplier<io.vertx.core.Future<io.vavr.Tuple4<A,B,C,D>>>
,Val<io.vavr.Tuple4<A,B,C,D>>
public class Quadruple<A,B,C,D> extends AbstractVal<io.vavr.Tuple4<A,B,C,D>>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vertx.core.Future<io.vavr.Tuple4<A,B,C,D>>
get()
<P> Val<P>
map(Function<io.vavr.Tuple4<A,B,C,D>,P> fn)
Creates a new value by applying a function to the successful result of this value.static <A,B,C,D>
Quadruple<A,B,C,D>of(Val<A> _1, Val<B> _2, Val<C> _3, Val<D> _4)
Val<io.vavr.Tuple4<A,B,C,D>>
retry(int attempts)
returns a new value tha will retry its execution if it failsVal<io.vavr.Tuple4<A,B,C,D>>
retry(int attempts, BiFunction<Throwable,Integer,Val<Void>> actionBeforeRetry)
returns a new value tha will retry its execution after the an action.Val<io.vavr.Tuple4<A,B,C,D>>
retryIf(Predicate<Throwable> predicate, int attempts)
returns a new value tha will retry its execution if it fails with an error that satisfies the given predicate.Val<io.vavr.Tuple4<A,B,C,D>>
retryIf(Predicate<Throwable> predicate, int attempts, BiFunction<Throwable,Integer,Val<Void>> actionBeforeRetry)
returns a new value tha will retry its execution after an action if it fails with an error that satisfies the given predicate.-
Methods inherited from class vertxval.core.AbstractVal
fallbackTo, flatMap, flatMap, onComplete, onComplete, onSuccess, recover, recoverWith
-
-
-
-
Method Detail
-
map
public <P> Val<P> map(Function<io.vavr.Tuple4<A,B,C,D>,P> fn)
Description copied from interface:Val
Creates a new value by applying a function to the successful result of this value. If this value returns an exception then the new value will also contain this exception.- Type Parameters:
P
- the type of the returned value- Parameters:
fn
- the function which will be applied to the successful result of this value- Returns:
- a new value
-
retry
public Val<io.vavr.Tuple4<A,B,C,D>> retry(int attempts)
Description copied from interface:Val
returns a new value tha will retry its execution if it fails- Parameters:
attempts
- the number of attempts before returning an error- Returns:
- a new value
-
retry
public Val<io.vavr.Tuple4<A,B,C,D>> retry(int attempts, BiFunction<Throwable,Integer,Val<Void>> actionBeforeRetry)
Description copied from interface:Val
returns a new value tha will retry its execution after the an action.- Parameters:
attempts
- the number of attempts before returning an erroractionBeforeRetry
- the function that produces the action to be executed before the retry- Returns:
- a new value
-
retryIf
public Val<io.vavr.Tuple4<A,B,C,D>> retryIf(Predicate<Throwable> predicate, int attempts)
Description copied from interface:Val
returns a new value tha will retry its execution if it fails with an error that satisfies the given predicate.- Parameters:
predicate
- the predicate against which the returned error will be tested onattempts
- the number of attempts before returning an error- Returns:
- a new value
-
retryIf
public Val<io.vavr.Tuple4<A,B,C,D>> retryIf(Predicate<Throwable> predicate, int attempts, BiFunction<Throwable,Integer,Val<Void>> actionBeforeRetry)
Description copied from interface:Val
returns a new value tha will retry its execution after an action if it fails with an error that satisfies the given predicate.- Parameters:
predicate
- the predicate against which the returned error will be tested onattempts
- the number of attempts before returning an erroractionBeforeRetry
- the function that produces the action to be executed before the retry- Returns:
- a new value
-
-