Package net.minecraft.util.thread
Class ParallelMapTransform.SplitterBase<K,U,V>
java.lang.Object
net.minecraft.util.thread.ParallelMapTransform.SplitterBase<K,U,V>
- Direct Known Subclasses:
ParallelMapTransform.BatchedTaskSplitter,ParallelMapTransform.SingleTaskSplitter
- Enclosing class:
ParallelMapTransform
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final ParallelMapTransform.Container<K, U, V> private intprivate intprivate final CompletableFuture<?>[] -
Constructor Summary
ConstructorsConstructorDescriptionSplitterBase(BiFunction<K, U, V> operation, int containerSize, int numBatches) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intbatchSize(int batchIndex) private intprotected abstract CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int lastScheduledIndex, int currentIndex, Executor executor) protected abstract CompletableFuture<Map<K, V>> scheduleFinalOperation(CompletableFuture<?> future, ParallelMapTransform.Container<K, U, V> container) scheduleTasks(Map<K, U> inputs, Executor executor)
-
Field Details
-
lastScheduledIndex
private int lastScheduledIndex -
currentIndex
private int currentIndex -
tasks
-
batchIndex
private int batchIndex -
container
-
-
Constructor Details
-
SplitterBase
SplitterBase(BiFunction<K, U, V> operation, int containerSize, int numBatches)
-
-
Method Details
-
pendingBatchSize
private int pendingBatchSize() -
scheduleTasks
-
batchSize
protected abstract int batchSize(int batchIndex) -
scheduleBatch
protected abstract CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int lastScheduledIndex, int currentIndex, Executor executor) -
scheduleFinalOperation
protected abstract CompletableFuture<Map<K,V>> scheduleFinalOperation(CompletableFuture<?> future, ParallelMapTransform.Container<K, U, V> container)
-