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
ConstructorsModifierConstructorDescriptionprivateSplitterBase(BiFunction<K, U, V> operation, int size, int taskCount) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intbatchSize(int index) private intprotected abstract CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int startIndex, int endIndex, Executor executor) protected abstract CompletableFuture<Map<K, V>> scheduleFinalOperation(CompletableFuture<?> allTasksDone, ParallelMapTransform.Container<K, U, V> container) scheduleTasks(Map<K, U> input, Executor executor)
-
Field Details
-
lastScheduledIndex
private int lastScheduledIndex -
currentIndex
private int currentIndex -
tasks
-
batchIndex
private int batchIndex -
container
-
-
Constructor Details
-
SplitterBase
-
-
Method Details
-
pendingBatchSize
private int pendingBatchSize() -
scheduleTasks
-
batchSize
protected abstract int batchSize(int index) -
scheduleBatch
protected abstract CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int startIndex, int endIndex, Executor executor) -
scheduleFinalOperation
protected abstract CompletableFuture<Map<K,V>> scheduleFinalOperation(CompletableFuture<?> allTasksDone, ParallelMapTransform.Container<K, U, V> container)
-