public interface FunctionalRoutineBuilder extends ConfigurableBuilder<FunctionalRoutineBuilder>
| Modifier and Type | Method and Description |
|---|---|
<OUT> FunctionalRoutine<Void,OUT> |
from(CommandInvocation<OUT> invocation)
Builds and returns a new functional routine generating outputs from the specified command
invocation.
|
<OUT> FunctionalRoutine<Void,OUT> |
from(Consumer<? super ResultChannel<OUT>> consumer)
Builds and returns a new functional routine generating outputs from the specified consumer.
|
<OUT> FunctionalRoutine<Void,OUT> |
from(Supplier<OUT> supplier)
Builds and returns a new functional routine generating outputs from the specified supplier.
|
<DATA> FunctionalRoutine<DATA,DATA> |
thenAsyncAccumulate(BiFunction<? super DATA,? super DATA,DATA> function)
Concatenates a functional routine based on the specified accumulate function.
|
<DATA> FunctionalRoutine<DATA,DATA> |
thenAsyncFilter(Predicate<? super DATA> predicate)
Concatenates a functional routine based on the specified predicate.
The output will be filtered according to the result returned by the predicate. |
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncMap(BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
Concatenates a functional routine based on the specified consumer.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncMap(Function<? super IN,OUT> function)
Concatenates a functional routine based on the specified function.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncMap(InvocationFactory<IN,OUT> factory)
Concatenates a functional routine based on the specified factory.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncMap(Routine<IN,OUT> routine)
Concatenates a functional routine based on the specified instance.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncReduce(BiConsumer<? super List<? extends IN>,? super ResultChannel<OUT>> consumer)
Concatenates a functional routine based on the specified reducing consumer.
The outputs will be reduced by applying the function, only when the routine invocation completes. |
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenAsyncReduce(Function<? super List<? extends IN>,OUT> function)
Concatenates a functional routine based on the specified reducing function.
The outputs will be reduced by applying the function, only when the routine invocation completes. |
<DATA> FunctionalRoutine<DATA,DATA> |
thenParallelFilter(Predicate<? super DATA> predicate)
Concatenates a functional routine based on the specified predicate.
The output will be filtered according to the result returned by the predicate. |
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenParallelMap(BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
Concatenates a functional routine based on the specified consumer.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenParallelMap(Function<? super IN,OUT> function)
Concatenates a functional routine based on the specified function.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenParallelMap(InvocationFactory<IN,OUT> factory)
Concatenates a functional routine based on the specified factory.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenParallelMap(Routine<IN,OUT> routine)
Concatenates a functional routine based on the specified instance.
|
<DATA> FunctionalRoutine<DATA,DATA> |
thenSyncAccumulate(BiFunction<? super DATA,? super DATA,DATA> function)
Concatenates a functional routine based on the specified accumulate function.
|
<DATA> FunctionalRoutine<DATA,DATA> |
thenSyncFilter(Predicate<? super DATA> predicate)
Concatenates a functional routine based on the specified predicate.
The output will be filtered according to the result returned by the predicate. |
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncMap(BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
Concatenates a functional routine based on the specified consumer.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncMap(Function<? super IN,OUT> function)
Concatenates a functional routine based on the specified function.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncMap(InvocationFactory<IN,OUT> factory)
Concatenates a functional routine based on the specified factory.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncMap(Routine<IN,OUT> routine)
Concatenates a functional routine based on the specified instance.
|
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncReduce(BiConsumer<? super List<? extends IN>,? super ResultChannel<OUT>> consumer)
Concatenates a functional routine based on the specified reducing consumer.
The outputs will be reduced by applying the function, only when the routine invocation completes. |
<IN,OUT> FunctionalRoutine<IN,OUT> |
thenSyncReduce(Function<? super List<? extends IN>,OUT> function)
Concatenates a functional routine based on the specified reducing function.
The outputs will be reduced by applying the function, only when the routine invocation completes. |
invocations@NotNull <OUT> FunctionalRoutine<Void,OUT> from(@NotNull CommandInvocation<OUT> invocation)
OUT - the output data type.invocation - the command invocation instance.@NotNull <OUT> FunctionalRoutine<Void,OUT> from(@NotNull Consumer<? super ResultChannel<OUT>> consumer)
OUT - the output data type.consumer - the consumer instance.@NotNull <OUT> FunctionalRoutine<Void,OUT> from(@NotNull Supplier<OUT> supplier)
OUT - the output data type.supplier - the supplier instance.@NotNull <DATA> FunctionalRoutine<DATA,DATA> thenAsyncAccumulate(@NotNull BiFunction<? super DATA,? super DATA,DATA> function)
acc = function.apply(acc, input);
The accumulated value will be passed as result only when the routine invocation completes.
Note that the created routine will be invoked in an asynchronous mode.DATA - the data type.function - the bi-function instance.@NotNull <DATA> FunctionalRoutine<DATA,DATA> thenAsyncFilter(@NotNull Predicate<? super DATA> predicate)
DATA - the data type.predicate - the predicate instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncMap(@NotNull BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
IN - the input data type.OUT - the output data type.consumer - the bi-consumer instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncMap(@NotNull Function<? super IN,OUT> function)
IN - the input data type.OUT - the output data type.function - the function instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncMap(@NotNull InvocationFactory<IN,OUT> factory)
IN - the input data type.OUT - the output data type.factory - the invocation factory.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncMap(@NotNull Routine<IN,OUT> routine)
IN - the input data type.OUT - the output data type.routine - the routine instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncReduce(@NotNull BiConsumer<? super List<? extends IN>,? super ResultChannel<OUT>> consumer)
IN - the input data type.OUT - the output data type.consumer - the bi-consumer instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenAsyncReduce(@NotNull Function<? super List<? extends IN>,OUT> function)
IN - the input data type.OUT - the output data type.function - the function instance.@NotNull <DATA> FunctionalRoutine<DATA,DATA> thenParallelFilter(@NotNull Predicate<? super DATA> predicate)
DATA - the data type.predicate - the predicate instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenParallelMap(@NotNull BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
IN - the input data type.OUT - the output data type.consumer - the bi-consumer instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenParallelMap(@NotNull Function<? super IN,OUT> function)
IN - the input data type.OUT - the output data type.function - the function instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenParallelMap(@NotNull InvocationFactory<IN,OUT> factory)
IN - the input data type.OUT - the output data type.factory - the invocation factory.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenParallelMap(@NotNull Routine<IN,OUT> routine)
IN - the input data type.OUT - the output data type.routine - the routine instance.@NotNull <DATA> FunctionalRoutine<DATA,DATA> thenSyncAccumulate(@NotNull BiFunction<? super DATA,? super DATA,DATA> function)
acc = function.apply(acc, input);
The accumulated value will be passed as result only when the routine invocation completes.
Note that the created routine will be invoked in a synchronous mode.DATA - the data type.function - the bi-function instance.@NotNull <DATA> FunctionalRoutine<DATA,DATA> thenSyncFilter(@NotNull Predicate<? super DATA> predicate)
DATA - the data type.predicate - the predicate instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncMap(@NotNull BiConsumer<? super IN,? super ResultChannel<OUT>> consumer)
IN - the input data type.OUT - the output data type.consumer - the bi-consumer instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncMap(@NotNull Function<? super IN,OUT> function)
IN - the input data type.OUT - the output data type.function - the function instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncMap(@NotNull InvocationFactory<IN,OUT> factory)
IN - the input data type.OUT - the output data type.factory - the invocation factory.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncMap(@NotNull Routine<IN,OUT> routine)
IN - the input data type.OUT - the output data type.routine - the routine instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncReduce(@NotNull BiConsumer<? super List<? extends IN>,? super ResultChannel<OUT>> consumer)
IN - the input data type.OUT - the output data type.consumer - the bi-consumer instance.@NotNull <IN,OUT> FunctionalRoutine<IN,OUT> thenSyncReduce(@NotNull Function<? super List<? extends IN>,OUT> function)
IN - the input data type.OUT - the output data type.function - the function instance.