Interface ExecutorBuilder<E extends java.util.concurrent.ExecutorService>

    • Method Detail

      • withKeepAlive

        ExecutorBuilder<E> withKeepAlive​(long keepAlive,
                                         java.util.concurrent.TimeUnit keepAliveUnits)
        Threads for the executor built by this factory will timeout (terminate) after the specified period.
      • withKeepAlive

        ExecutorBuilder<E> withKeepAlive()
        Core threads for the executor built by this factory will never timeout (default for single threaded builders). Note that there is ordinarily no difference between core and non-core threads; only when the queue limit is zero do we create non-core threads.
      • withThreadPriority

        ExecutorBuilder<E> withThreadPriority​(int threadPriority)
        Specify the priority of threads that service the executor built by this factory (default to Thread.NORM_PRIORITY)
      • withThreadGroup

        ExecutorBuilder<E> withThreadGroup​(java.lang.ThreadGroup threadGroup)
        Threads for the executor built by this factory will all be (transitively) members of threadGroup, but may directly reside in a child thread group.
      • withDefaultThreadGroup

        ExecutorBuilder<E> withDefaultThreadGroup()
        Use the system default thread group for the threads we create. This is used only for testing, so that we do not hold onto a transitive global reference to all threads.