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>>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IteratorAsSpliterator<T>
get()
IteratorAsSpliterator.Builder<T>
setBatchIncrease(int batchIncrease)
Sets the batch increase size.IteratorAsSpliterator.Builder<T>
setCharacteristics(int characteristics)
Sets the characteristics the subsequent spliterator will have.IteratorAsSpliterator.Builder<T>
setEstimateRemaining(long estimateRemaining)
Sets how many estimated elements are remaining for this iterator This defaults to Long.MAX_VALUE.IteratorAsSpliterator.Builder
setMaxBatchSize(int maxBatchSize)
Sets the max batch size for a thread to use - This defaults to 51200
-
-
-
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
-
get
public IteratorAsSpliterator<T> get()
-
-