Package net.minecraft.util.thread
Class ProcessorMailbox<T>
java.lang.Object
net.minecraft.util.thread.ProcessorMailbox<T>
- All Implemented Interfaces:
- AutoCloseable,- Runnable,- ProfilerMeasured,- ProcessorHandle<T>
public class ProcessorMailbox<T>
extends Object
implements ProfilerMeasured, ProcessorHandle<T>, AutoCloseable, Runnable
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate final Executorprivate static final org.slf4j.Loggerprivate final Stringprivate final StrictQueue<? super T,? extends Runnable> private static final intprivate final AtomicInteger
- 
Constructor SummaryConstructorsConstructorDescriptionProcessorMailbox(StrictQueue<? super T, ? extends Runnable> p_18741_, Executor p_18742_, String p_18743_) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate booleanvoidclose()static ProcessorMailbox<Runnable>booleanhasWork()name()private booleanpollTask()private intpollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_18748_) private voidvoidrun()voidrunAll()private voidprivate booleanprivate booleanintsize()voidtoString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.thread.ProcessorHandleask, askEither
- 
Field Details- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
CLOSED_BITprivate static final int CLOSED_BIT- See Also:
 
- 
SCHEDULED_BITprivate static final int SCHEDULED_BIT- See Also:
 
- 
status
- 
queue
- 
dispatcher
- 
name
 
- 
- 
Constructor Details- 
ProcessorMailboxpublic ProcessorMailbox(StrictQueue<? super T, ? extends Runnable> p_18741_, Executor p_18742_, String p_18743_) 
 
- 
- 
Method Details- 
create
- 
setAsScheduledprivate boolean setAsScheduled()
- 
setAsIdleprivate void setAsIdle()
- 
canBeScheduledprivate boolean canBeScheduled()
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- ProcessorHandle<T>
 
- 
shouldProcessprivate boolean shouldProcess()
- 
pollTaskprivate boolean pollTask()
- 
runpublic void run()
- 
runAllpublic void runAll()
- 
tell- Specified by:
- tellin interface- ProcessorHandle<T>
 
- 
registerForExecutionprivate void registerForExecution()
- 
pollUntilprivate int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_18748_) 
- 
sizepublic int size()
- 
hasWorkpublic boolean hasWork()
- 
toString
- 
name- Specified by:
- namein interface- ProcessorHandle<T>
 
- 
profiledMetrics- Specified by:
- profiledMetricsin interface- ProfilerMeasured
 
 
-