Class ThreadTaskExecutor<R extends java.lang.Runnable>

    • Field Detail

      • name

        private final java.lang.String name
      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • pendingRunnables

        private final java.util.Queue<R extends java.lang.Runnable> pendingRunnables
      • blockingCount

        private int blockingCount
    • Constructor Detail

      • ThreadTaskExecutor

        protected ThreadTaskExecutor​(java.lang.String p_i50403_1_)
    • Method Detail

      • wrapRunnable

        protected abstract R wrapRunnable​(java.lang.Runnable p_212875_1_)
      • shouldRun

        protected abstract boolean shouldRun​(R p_212874_1_)
      • isSameThread

        public boolean isSameThread()
      • getRunningThread

        protected abstract java.lang.Thread getRunningThread()
      • scheduleExecutables

        protected boolean scheduleExecutables()
      • getPendingTasksCount

        public int getPendingTasksCount()
      • name

        public java.lang.String name()
        Specified by:
        name in interface ITaskExecutor<R extends java.lang.Runnable>
      • submit

        public <V> java.util.concurrent.CompletableFuture<V> submit​(java.util.function.Supplier<V> p_213169_1_)
      • submitAsync

        public java.util.concurrent.CompletableFuture<java.lang.Void> submitAsync​(java.lang.Runnable p_213165_1_)
      • submit

        public java.util.concurrent.CompletableFuture<java.lang.Void> submit​(java.lang.Runnable p_222817_1_)
      • executeBlocking

        public void executeBlocking​(java.lang.Runnable p_213167_1_)
      • tell

        public void tell​(R p_212871_1_)
        Specified by:
        tell in interface ITaskExecutor<R extends java.lang.Runnable>
      • execute

        public void execute​(java.lang.Runnable p_execute_1_)
        Specified by:
        execute in interface java.util.concurrent.Executor
      • dropAllTasks

        protected void dropAllTasks()
      • runAllTasks

        protected void runAllTasks()
      • pollTask

        protected boolean pollTask()
      • managedBlock

        public void managedBlock​(java.util.function.BooleanSupplier p_213161_1_)
      • waitForTasks

        protected void waitForTasks()
      • doRunTask

        protected void doRunTask​(R p_213166_1_)