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