java.lang.Object
com.google.cloud.spring.data.datastore.core.util.SliceUtil

public final class SliceUtil extends Object
Since:
1.2
  • Method Details

    • sliceAndExecute

      public static <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.
      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.