Class ExecutorServiceUtils


  • public class ExecutorServiceUtils
    extends Object
    • Method Detail

      • create

        public static ExecutorService create​(org.apache.pinot.spi.env.PinotConfiguration conf,
                                             String confPrefix,
                                             String baseName)
      • close

        public static void close​(ExecutorService executorService)
        Shuts down the given executor service. This method blocks a default number of millis in order to wait for termination. In case the executor doesn't terminate in that time, the code continues with a logging.
        Throws:
        RuntimeException - if this threads is interrupted when waiting for termination.
      • close

        public static void close​(ExecutorService executorService,
                                 long terminationMillis)
        Shuts down the given executor service. This method blocks up to the given millis in order to wait for termination. In case the executor doesn't terminate in that time, the code continues with a logging.
        Throws:
        RuntimeException - if this threads is interrupted when waiting for termination.