Class DelegatedTaskExecutor<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Runnable, ITaskExecutor<T>

    public class DelegatedTaskExecutor<T>
    extends java.lang.Object
    implements ITaskExecutor<T>, java.lang.AutoCloseable, java.lang.Runnable
    • Field Detail

      • LOGGER

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

        private final java.util.concurrent.atomic.AtomicInteger status
      • queue

        public final ITaskQueue<? super T,​? extends java.lang.Runnable> queue
      • dispatcher

        private final java.util.concurrent.Executor dispatcher
      • name

        private final java.lang.String name
    • Constructor Detail

      • DelegatedTaskExecutor

        public DelegatedTaskExecutor​(ITaskQueue<? super T,​? extends java.lang.Runnable> p_i50402_1_,
                                     java.util.concurrent.Executor p_i50402_2_,
                                     java.lang.String p_i50402_3_)
    • Method Detail

      • create

        public static DelegatedTaskExecutor<java.lang.Runnable> create​(java.util.concurrent.Executor p_213144_0_,
                                                                       java.lang.String p_213144_1_)
      • setAsScheduled

        private boolean setAsScheduled()
      • setAsIdle

        private void setAsIdle()
      • canBeScheduled

        private boolean canBeScheduled()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface ITaskExecutor<T>
      • shouldProcess

        private boolean shouldProcess()
      • pollTask

        private boolean pollTask()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • tell

        public void tell​(T p_212871_1_)
        Specified by:
        tell in interface ITaskExecutor<T>
      • registerForExecution

        private void registerForExecution()
      • pollUntil

        private int pollUntil​(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • name

        public java.lang.String name()
        Specified by:
        name in interface ITaskExecutor<T>