Package net.minecraft.util.thread
Class AbstractConsecutiveExecutor<T extends Runnable>
java.lang.Object
net.minecraft.util.thread.AbstractConsecutiveExecutor<T>
- All Implemented Interfaces:
AutoCloseable
,Runnable
,ProfilerMeasured
,TaskScheduler<T>
- Direct Known Subclasses:
ConsecutiveExecutor
,PriorityConsecutiveExecutor
public abstract class AbstractConsecutiveExecutor<T extends Runnable>
extends Object
implements ProfilerMeasured, TaskScheduler<T>, Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Executor
private static final org.slf4j.Logger
private final String
private final StrictQueue
<T> private final AtomicReference
<AbstractConsecutiveExecutor.Status> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConsecutiveExecutor
(StrictQueue<T> p_371592_, Executor p_371871_, String p_371799_) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.util.thread.TaskScheduler
scheduleWithResult, wrapRunnable
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
status
-
queue
-
executor
-
name
-
-
Constructor Details
-
AbstractConsecutiveExecutor
-
-
Method Details
-
canBeScheduled
private boolean canBeScheduled() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTaskScheduler<T extends Runnable>
-
pollTask
private boolean pollTask() -
run
public void run() -
runAll
public void runAll() -
schedule
- Specified by:
schedule
in interfaceTaskScheduler<T extends Runnable>
-
registerForExecution
private void registerForExecution() -
size
public int size() -
hasWork
public boolean hasWork() -
toString
-
name
- Specified by:
name
in interfaceTaskScheduler<T extends Runnable>
-
profiledMetrics
- Specified by:
profiledMetrics
in interfaceProfilerMeasured
-
setRunning
private boolean setRunning() -
setSleeping
private void setSleeping() -
isRunning
private boolean isRunning() -
isClosed
private boolean isClosed()
-