Package net.minecraft.world.chunk
Class ChunkTaskPriorityQueueSorter
java.lang.Object
net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter
- All Implemented Interfaces:
AutoCloseable
,ChunkHolder.IListener
public class ChunkTaskPriorityQueueSorter
extends Object
implements AutoCloseable, ChunkHolder.IListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
private final DelegatedTaskExecutor<ITaskQueue.RunnableWithPriority>
private final Map<ITaskExecutor<?>,
ChunkTaskPriorityQueue<? extends Function<ITaskExecutor<Unit>, ?>>> private final Set<ITaskExecutor<?>>
-
Constructor Summary
ConstructorDescriptionChunkTaskPriorityQueueSorter
(List<ITaskExecutor<?>> p_i50713_1_, Executor p_i50713_2_, int p_i50713_3_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getProcessor
(ITaskExecutor<T> p_219087_1_, boolean p_219087_2_) private <T> ChunkTaskPriorityQueue<Function<ITaskExecutor<Unit>,
T>> getQueue
(ITaskExecutor<T> p_219068_1_) getReleaseProcessor
(ITaskExecutor<Runnable> p_219091_1_) message
(Runnable p_219069_0_, long p_219069_1_, IntSupplier p_219069_3_) message
(ChunkHolder p_219081_0_, Runnable p_219081_1_) void
onLevelChange
(ChunkPos p_219066_1_, IntSupplier p_219066_2_, int p_219066_3_, IntConsumer p_219066_4_) private <T> void
pollTask
(ChunkTaskPriorityQueue<Function<ITaskExecutor<Unit>, T>> p_219078_1_, ITaskExecutor<T> p_219078_2_) private <T> void
release
(ITaskExecutor<T> p_219074_1_, long p_219074_2_, Runnable p_219074_4_, boolean p_219074_5_) private <T> void
submit
(ITaskExecutor<T> p_219067_1_, Function<ITaskExecutor<Unit>, T> p_219067_2_, long p_219067_3_, IntSupplier p_219067_5_, boolean p_219067_6_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
queues
private final Map<ITaskExecutor<?>,ChunkTaskPriorityQueue<? extends Function<ITaskExecutor<Unit>, queues?>>> -
sleeping
-
mailbox
-
-
Constructor Details
-
ChunkTaskPriorityQueueSorter
public ChunkTaskPriorityQueueSorter(List<ITaskExecutor<?>> p_i50713_1_, Executor p_i50713_2_, int p_i50713_3_)
-
-
Method Details
-
message
public static ChunkTaskPriorityQueueSorter.FunctionEntry<Runnable> message(Runnable p_219069_0_, long p_219069_1_, IntSupplier p_219069_3_) -
message
public static ChunkTaskPriorityQueueSorter.FunctionEntry<Runnable> message(ChunkHolder p_219081_0_, Runnable p_219081_1_) -
release
public static ChunkTaskPriorityQueueSorter.RunnableEntry release(Runnable p_219073_0_, long p_219073_1_, boolean p_219073_3_) -
getProcessor
public <T> ITaskExecutor<ChunkTaskPriorityQueueSorter.FunctionEntry<T>> getProcessor(ITaskExecutor<T> p_219087_1_, boolean p_219087_2_) -
getReleaseProcessor
public ITaskExecutor<ChunkTaskPriorityQueueSorter.RunnableEntry> getReleaseProcessor(ITaskExecutor<Runnable> p_219091_1_) -
onLevelChange
public void onLevelChange(ChunkPos p_219066_1_, IntSupplier p_219066_2_, int p_219066_3_, IntConsumer p_219066_4_) - Specified by:
onLevelChange
in interfaceChunkHolder.IListener
-
release
private <T> void release(ITaskExecutor<T> p_219074_1_, long p_219074_2_, Runnable p_219074_4_, boolean p_219074_5_) -
submit
private <T> void submit(ITaskExecutor<T> p_219067_1_, Function<ITaskExecutor<Unit>, T> p_219067_2_, long p_219067_3_, IntSupplier p_219067_5_, boolean p_219067_6_) -
pollTask
private <T> void pollTask(ChunkTaskPriorityQueue<Function<ITaskExecutor<Unit>, T>> p_219078_1_, ITaskExecutor<T> p_219078_2_) -
getQueue
private <T> ChunkTaskPriorityQueue<Function<ITaskExecutor<Unit>,T>> getQueue(ITaskExecutor<T> p_219068_1_) -
getDebugStatus
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-