Interface DynamicExecutor


  • public interface DynamicExecutor
    The executor interface to provide concurrent functionality.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BACKUP_POOL_SIZE
      Backup pool size for the executor.
      static java.util.concurrent.BlockingQueue<java.lang.Runnable> BACKUP_WORK_QUEUE
      Instantiates the queue of Runnables as a LinkedBlockingDeque.
      static int CORE_POOL_SIZE
      Core pool size for the executor.
      static long KEEP_ALIVE
      The amount of time an idle thread waits before terminating.
      static java.util.concurrent.TimeUnit KEEP_ALIVE_UNIT
      The keep alive time unit.
      static int MAXIMUM_POOL_SIZE
      Maximum pool size for the executor.
      static int NUMBER_OF_CORES
      Gets the number of available cores.
      static java.util.concurrent.ThreadFactory THREAD_FACTORY
      Thread factory for the backup pool executor.
      static java.util.concurrent.BlockingQueue<java.lang.Runnable> WORK_QUEUE
      Instantiates the queue of Runnables as a SynchronousQueue.
    • Field Detail

      • NUMBER_OF_CORES

        static final int NUMBER_OF_CORES
        Gets the number of available cores. (not always the same as the maximum number of cores)
      • CORE_POOL_SIZE

        static final int CORE_POOL_SIZE
        Core pool size for the executor.
        See Also:
        Constant Field Values
      • MAXIMUM_POOL_SIZE

        static final int MAXIMUM_POOL_SIZE
        Maximum pool size for the executor.
        See Also:
        Constant Field Values
      • BACKUP_POOL_SIZE

        static final int BACKUP_POOL_SIZE
        Backup pool size for the executor.
        See Also:
        Constant Field Values
      • WORK_QUEUE

        static final java.util.concurrent.BlockingQueue<java.lang.Runnable> WORK_QUEUE
        Instantiates the queue of Runnables as a SynchronousQueue.
      • BACKUP_WORK_QUEUE

        static final java.util.concurrent.BlockingQueue<java.lang.Runnable> BACKUP_WORK_QUEUE
        Instantiates the queue of Runnables as a LinkedBlockingDeque.
      • KEEP_ALIVE

        static final long KEEP_ALIVE
        The amount of time an idle thread waits before terminating.
        See Also:
        Constant Field Values
      • KEEP_ALIVE_UNIT

        static final java.util.concurrent.TimeUnit KEEP_ALIVE_UNIT
        The keep alive time unit.
      • THREAD_FACTORY

        static final java.util.concurrent.ThreadFactory THREAD_FACTORY
        Thread factory for the backup pool executor.
    • Method Detail

      • getDefaultExecutor

        @NonNull
        java.util.concurrent.ExecutorService getDefaultExecutor()
        Returns the default executor service.
        Returns:
        The default executor service.