Class SliceUtil
java.lang.Object
com.google.cloud.spring.data.datastore.core.util.SliceUtil
- Since:
- 1.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
sliceAndExecute
(T[] elements, int sliceSize, Consumer<T[]> consumer) Cut array into slices of a given size and call consumer on each of them.
-
Method Details
-
sliceAndExecute
Cut array into slices of a given size and call consumer on each of them.- Type Parameters:
T
- the type of the elements.- Parameters:
elements
- the array to be sliced.sliceSize
- the max size of a slice.consumer
- the consumer to be called on every slice.
-