Class ParallelMapTransform.BatchedTaskSplitter<K,U,V>
java.lang.Object
net.minecraft.util.thread.ParallelMapTransform.SplitterBase<K,U,V>
net.minecraft.util.thread.ParallelMapTransform.BatchedTaskSplitter<K,U,V>
- Enclosing class:
ParallelMapTransform
private static class ParallelMapTransform.BatchedTaskSplitter<K,U,V>
extends ParallelMapTransform.SplitterBase<K,U,V>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBatchedTaskSplitter(BiFunction<K, U, V> operation, int size, int maxTasks) -
Method Summary
Modifier and TypeMethodDescriptionprotected intbatchSize(int index) private static <K,U, V> Runnable createTask(Map<K, V> result, int startIndex, int endIndex, ParallelMapTransform.Container<K, U, V> container) protected CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int startIndex, int endIndex, Executor executor) protected CompletableFuture<Map<K, V>> scheduleFinalOperation(CompletableFuture<?> allTasksDone, ParallelMapTransform.Container<K, U, V> container) Methods inherited from class ParallelMapTransform.SplitterBase
scheduleTasks
-
Field Details
-
result
-
batchSize
private final int batchSize -
firstUndersizedBatchIndex
private final int firstUndersizedBatchIndex
-
-
Constructor Details
-
BatchedTaskSplitter
-
-
Method Details
-
scheduleBatch
protected CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> container, int startIndex, int endIndex, Executor executor) - Specified by:
scheduleBatchin classParallelMapTransform.SplitterBase<K,U, V>
-
batchSize
protected int batchSize(int index) - Specified by:
batchSizein classParallelMapTransform.SplitterBase<K,U, V>
-
createTask
private static <K,U, Runnable createTaskV> (Map<K, V> result, int startIndex, int endIndex, ParallelMapTransform.Container<K, U, V> container) -
scheduleFinalOperation
protected CompletableFuture<Map<K,V>> scheduleFinalOperation(CompletableFuture<?> allTasksDone, ParallelMapTransform.Container<K, U, V> container) - Specified by:
scheduleFinalOperationin classParallelMapTransform.SplitterBase<K,U, V>
-