Package ca.uhn.fhir.util
Class TaskChunker<T>
java.lang.Object
ca.uhn.fhir.util.TaskChunker<T>
- Type Parameters:
T
- The type for the chunks
This utility takes an input collection, breaks it up into chunks of a
given maximum chunk size, and then passes those chunks to a consumer for
processing. Use this to break up large tasks into smaller tasks.
- Since:
- 6.6.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
chunk
(Collection<T> theInput, int theChunkSize, Consumer<List<T>> theBatchConsumer) static <T> void
static <T> void
-
Constructor Details
-
TaskChunker
public TaskChunker()
-
-
Method Details
-
chunk
-
chunk
public static <T> void chunk(Collection<T> theInput, int theChunkSize, Consumer<List<T>> theBatchConsumer) -
chunk
-
chunk
-