Class Batch<T extends Aggregate>

    • Constructor Summary

      Constructors 
      Constructor Description
      Batch​(List<T> aggregates)
      This constructor takes List of Aggregates, and builds Batch instance, usable with Nd4j executioner.
    • Constructor Detail

      • Batch

        public Batch​(List<T> aggregates)
        This constructor takes List of Aggregates, and builds Batch instance, usable with Nd4j executioner.
        Parameters:
        aggregates -
    • Method Detail

      • opNum

        public int opNum()
        This method returns opNum for batched aggregate
        Returns:
      • append

        public boolean append​(T aggregate)
        This method tries to append aggregate to the current batch, if it has free room
        Parameters:
        aggregate -
        Returns:
      • isFull

        public boolean isFull()
        This method checks, if number of batched aggregates equals to maximum possible value
        Returns:
      • getBatches

        public static <U extends AggregateList<Batch<U>> getBatches​(List<U> list)
        Helper method to create batch from list of aggregates, for cases when list of aggregates is higher then batchLimit
        Type Parameters:
        U -
        Parameters:
        list -
        Returns:
      • getBatches

        public static <U extends AggregateList<Batch<U>> getBatches​(List<U> list,
                                                                      int partitionSize)
        Helper method to create batch from list of aggregates, for cases when list of aggregates is higher then batchLimit
        Type Parameters:
        U -
        Parameters:
        list -
        Returns: