@Override protected Promise<? extends T> run(Context context) throws Throwable { return func.apply(context); } };
private <R> PromiseTransformer<S, R> doCompose(final PromiseTransformer<T, R> propagator) { return new PromiseTransformer<S, R>(_transform.andThen(propagator._transform)); }
private <R> PromiseTransformer<S, R> doCompose(final PromiseTransformer<T, R> propagator) { return new PromiseTransformer<S, R>(_transform.andThen(propagator._transform)); }
private static Object coerceValue(String property, Object value) throws RequestConfigKeyParsingException { try { switch(property) { case "timeoutMs": return ConfigValueCoercers.LONG.apply(value); case "batchingEnabled": return ConfigValueCoercers.BOOLEAN.apply(value); case "maxBatchSize": return ConfigValueCoercers.INTEGER.apply(value); default: throw new RequestConfigKeyParsingException("Internal error: parsed config contains unsupported property: " + property); } } catch (Exception e) { throw new RequestConfigKeyParsingException(e); } }
default <V> Function8<T1, T2, T3, T4, T5, T6, T7, T8, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8)); }
default <V> Function7<T1, T2, T3, T4, T5, T6, T7, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7)); }
default <V> Function2<T1, T2, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2) -> f.apply(apply(t1, t2)); }
default <V> Function13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13)); }
default <V> Function3<T1, T2, T3, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3) -> f.apply(apply(t1, t2, t3)); }
default <V> Function11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11)); }
default <V> Function10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)); }
default <V> Function6<T1, T2, T3, T4, T5, T6, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) -> f.apply(apply(t1, t2, t3, t4, t5, t6)); }
default <V> Function4<T1, T2, T3, T4, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4) -> f.apply(apply(t1, t2, t3, t4)); }
default <V> Function15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15)); }
default <V> Function5<T1, T2, T3, T4, T5, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) -> f.apply(apply(t1, t2, t3, t4, t5)); }
default <V> Function12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12)); }
default <V> Function9<T1, T2, T3, T4, T5, T6, T7, T8, T9, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9)); }
default <V> Function14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, V> andThen(Function1<? super R, ? extends V> f) { Objects.requireNonNull(f); return (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14) -> f.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14)); }
@Override public void accept(Promise<S> src, Settable<T> dst) { if (src.isFailed()) { dst.fail(src.getError()); } else { try { dst.done(_transform.apply(src.get())); } catch (Throwable t) { dst.fail(t); } } }