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 Executorprivate static final org.slf4j.Loggerprivate final Stringprivate final StrictQueue<T> private final AtomicReference<AbstractConsecutiveExecutor.Status> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConsecutiveExecutor(StrictQueue<T> pQueue, Executor pExecutor, String pName) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceTaskScheduler<T extends Runnable>
-
pollTask
private boolean pollTask() -
run
public void run() -
runAll
public void runAll() -
schedule
- Specified by:
schedulein interfaceTaskScheduler<T extends Runnable>
-
registerForExecution
private void registerForExecution() -
size
public int size() -
hasWork
public boolean hasWork() -
toString
-
name
- Specified by:
namein interfaceTaskScheduler<T extends Runnable>
-
profiledMetrics
- Specified by:
profiledMetricsin interfaceProfilerMeasured
-
setRunning
private boolean setRunning() -
setSleeping
private void setSleeping() -
isRunning
private boolean isRunning() -
isClosed
private boolean isClosed()
-