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 Runnable, TaskScheduler<T>, ProfilerMeasured
-
Nested Class Summary
Nested Classes -
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> queue, Executor executor, String name) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
-
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()
-