Class IteratorAsSpliterator.Builder<T>

    • Constructor Detail

      • Builder

        public Builder​(Iterator<? extends T> iterator)
      • Builder

        public Builder​(org.infinispan.commons.util.CloseableIterator<? extends T> closeableIterator)
    • Method Detail

      • setCharacteristics

        public IteratorAsSpliterator.Builder<T> setCharacteristics​(int characteristics)
        Sets the characteristics the subsequent spliterator will have.
        Parameters:
        characteristics -
        Returns:
      • setBatchIncrease

        public IteratorAsSpliterator.Builder<T> setBatchIncrease​(int batchIncrease)
        Sets the batch increase size. This controls how much larger subsequent splits are. The default value is 1024;
        Parameters:
        batchIncrease -
        Returns:
        this
      • setMaxBatchSize

        public IteratorAsSpliterator.Builder setMaxBatchSize​(int maxBatchSize)
        Sets the max batch size for a thread to use - This defaults to 51200
        Parameters:
        maxBatchSize -
        Returns:
        this
      • setEstimateRemaining

        public IteratorAsSpliterator.Builder<T> setEstimateRemaining​(long estimateRemaining)
        Sets how many estimated elements are remaining for this iterator This defaults to Long.MAX_VALUE. It is heavily recommended to provide an exact or estimate value to help with controlling parallelism
        Parameters:
        estimateRemaining -
        Returns:
        this