Class Execs


  • public class Execs
    extends Object
    • Constructor Detail

      • Execs

        public Execs()
    • Method Detail

      • dummy

        public static ExecutorService dummy()
        Returns an ExecutorService which is terminated and shutdown from the beginning and not able to accept any tasks.
      • multiThreaded

        public static ExecutorService multiThreaded​(int threads,
                                                    @NotNull
                                                    @NotNull String nameFormat)
      • makeThreadFactory

        public static ThreadFactory makeThreadFactory​(@NotNull
                                                      @NotNull String nameFormat)
      • makeThread

        public static Thread makeThread​(String name,
                                        Runnable runnable,
                                        boolean isDaemon)
      • newBlockingSingleThreaded

        public static ExecutorService newBlockingSingleThreaded​(String nameFormat,
                                                                int capacity)
        Parameters:
        nameFormat - nameformat for threadFactory
        capacity - maximum capacity after which the executorService will block on accepting new tasks
        Returns:
        ExecutorService which blocks accepting new tasks when the capacity reached
      • newBlockingSingleThreaded

        public static ExecutorService newBlockingSingleThreaded​(String nameFormat,
                                                                int capacity,
                                                                Integer priority)
      • directExecutor

        public static com.google.common.util.concurrent.ListeningExecutorService directExecutor()