Module io.github.bucket4j.core
Class BatchHelper<T,R,CT,CR>
- java.lang.Object
-
- io.github.bucket4j.util.concurrent.batch.BatchHelper<T,R,CT,CR>
-
- Type Parameters:
T- Task typeR- Task result typeCT- Combined task typeCR- Combined task result
public class BatchHelper<T,R,CT,CR> extends Object
Helper class for batching
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBatchHelper.BatchFailedException
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,R,CT,CR>
BatchHelper<T,R,CT,CR>create(Function<List<T>,CT> taskCombiner, Function<CT,CR> combinedTaskExecutor, BiFunction<CT,CR,List<R>> combinedResultSplitter)static <T,R,CT,CR>
BatchHelper<T,R,CT,CR>create(Function<List<T>,CT> taskCombiner, Function<CT,CR> combinedTaskExecutor, Function<T,R> taskExecutor, BiFunction<CT,CR,List<R>> combinedResultSplitter)Rexecute(T task)
-
-
-
Method Detail
-
create
public static <T,R,CT,CR> BatchHelper<T,R,CT,CR> create(Function<List<T>,CT> taskCombiner, Function<CT,CR> combinedTaskExecutor, Function<T,R> taskExecutor, BiFunction<CT,CR,List<R>> combinedResultSplitter)
-
create
public static <T,R,CT,CR> BatchHelper<T,R,CT,CR> create(Function<List<T>,CT> taskCombiner, Function<CT,CR> combinedTaskExecutor, BiFunction<CT,CR,List<R>> combinedResultSplitter)
-
-