Class IteratorAsSpliterator.Builder<T>
java.lang.Object
org.infinispan.stream.impl.spliterators.IteratorAsSpliterator.Builder<T>
- All Implemented Interfaces:
Supplier<IteratorAsSpliterator<T>>
- Enclosing class:
- IteratorAsSpliterator<T>
public static class IteratorAsSpliterator.Builder<T>
extends Object
implements Supplier<IteratorAsSpliterator<T>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()setBatchIncrease(int batchIncrease) Sets the batch increase size.setCharacteristics(int characteristics) Sets the characteristics the subsequent spliterator will have.setEstimateRemaining(long estimateRemaining) Sets how many estimated elements are remaining for this iterator This defaults to Long.MAX_VALUE.setMaxBatchSize(int maxBatchSize) Sets the max batch size for a thread to use - This defaults to 51200
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
setCharacteristics
Sets the characteristics the subsequent spliterator will have.- Parameters:
characteristics-- Returns:
-
setBatchIncrease
Sets the batch increase size. This controls how much larger subsequent splits are. The default value is 1024;- Parameters:
batchIncrease-- Returns:
- this
-
setMaxBatchSize
Sets the max batch size for a thread to use - This defaults to 51200- Parameters:
maxBatchSize-- Returns:
- this
-
setEstimateRemaining
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
-
get
-