Package net.minecraft.util.thread
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
static class ParallelMapTransform.BatchedTaskSplitter<K,U,V>
extends ParallelMapTransform.SplitterBase<K,U,V>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBatchedTaskSplitter(BiFunction<K, U, V> pOperation, int pContainerSize, int pNumBatches) -
Method Summary
Modifier and TypeMethodDescriptionprotected intbatchSize(int pBatchIndex) private static <K,U, V> Runnable createTask(Map<K, V> pResult, int pLastScheduledIndex, int pCurrentIndex, ParallelMapTransform.Container<K, U, V> pContainer) protected CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> pContainer, int pLastScheduledIndex, int pCurrentIndex, Executor pExecutor) protected CompletableFuture<Map<K, V>> scheduleFinalOperation(CompletableFuture<?> pFuture, ParallelMapTransform.Container<K, U, V> pContainer) Methods inherited from class net.minecraft.util.thread.ParallelMapTransform.SplitterBase
scheduleTasks
-
Field Details
-
result
-
batchSize
private final int batchSize -
firstUndersizedBatchIndex
private final int firstUndersizedBatchIndex
-
-
Constructor Details
-
BatchedTaskSplitter
BatchedTaskSplitter(BiFunction<K, U, V> pOperation, int pContainerSize, int pNumBatches)
-
-
Method Details
-
scheduleBatch
protected CompletableFuture<?> scheduleBatch(ParallelMapTransform.Container<K, U, V> pContainer, int pLastScheduledIndex, int pCurrentIndex, Executor pExecutor) - Specified by:
scheduleBatchin classParallelMapTransform.SplitterBase<K,U, V>
-
batchSize
protected int batchSize(int pBatchIndex) - Specified by:
batchSizein classParallelMapTransform.SplitterBase<K,U, V>
-
createTask
private static <K,U, Runnable createTaskV> (Map<K, V> pResult, int pLastScheduledIndex, int pCurrentIndex, ParallelMapTransform.Container<K, U, V> pContainer) -
scheduleFinalOperation
protected CompletableFuture<Map<K,V>> scheduleFinalOperation(CompletableFuture<?> pFuture, ParallelMapTransform.Container<K, U, V> pContainer) - Specified by:
scheduleFinalOperationin classParallelMapTransform.SplitterBase<K,U, V>
-