Class IgniteThreadPoolExecutor

    • Constructor Detail

      • IgniteThreadPoolExecutor

        public IgniteThreadPoolExecutor​(String threadNamePrefix,
                                        String igniteInstanceName,
                                        int corePoolSize,
                                        int maxPoolSize,
                                        long keepAliveTime,
                                        BlockingQueue<Runnable> workQ)
        Creates a new service with the given initial parameters. NOTE: There is a known bug. If 'corePoolSize' equals 0, then the pool will degrade to a single-threaded pool.
        Parameters:
        threadNamePrefix - Will be added at the beginning of all created threads.
        igniteInstanceName - Must be the name of the grid.
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        keepAliveTime - When the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
        workQ - The queue to use for holding tasks before they are executed. This queue will hold only runnable tasks submitted by the ThreadPoolExecutor.execute(Runnable) method.
      • IgniteThreadPoolExecutor

        public IgniteThreadPoolExecutor​(String threadNamePrefix,
                                        String igniteInstanceName,
                                        int corePoolSize,
                                        int maxPoolSize,
                                        long keepAliveTime,
                                        BlockingQueue<Runnable> workQ,
                                        byte plc,
                                        Thread.UncaughtExceptionHandler eHnd)
        Creates a new service with the given initial parameters. NOTE: There is a known bug. If 'corePoolSize' equals 0, then the pool will degrade to a single-threaded pool.
        Parameters:
        threadNamePrefix - Will be added at the beginning of all created threads.
        igniteInstanceName - Must be the name of the grid.
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        keepAliveTime - When the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
        workQ - The queue to use for holding tasks before they are executed. This queue will hold only runnable tasks submitted by the ThreadPoolExecutor.execute(Runnable) method.
        plc - GridIoPolicy for thread pool.
        eHnd - Uncaught exception handler for thread pool.
      • IgniteThreadPoolExecutor

        public IgniteThreadPoolExecutor​(int corePoolSize,
                                        int maxPoolSize,
                                        long keepAliveTime,
                                        BlockingQueue<Runnable> workQ,
                                        ThreadFactory threadFactory)
        Creates a new service with the given initial parameters. NOTE: There is a known bug. If 'corePoolSize' equals 0, then the pool will degrade to a single-threaded pool. *
        Parameters:
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        keepAliveTime - When the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
        workQ - The queue to use for holding tasks before they are executed. This queue will hold only the runnable tasks submitted by the ThreadPoolExecutor.execute(Runnable) method.
        threadFactory - Thread factory.
      • IgniteThreadPoolExecutor

        protected IgniteThreadPoolExecutor​(int corePoolSize,
                                           int maxPoolSize,
                                           long keepAliveTime,
                                           BlockingQueue<Runnable> workQ,
                                           ThreadFactory threadFactory,
                                           @Nullable
                                           @Nullable HistogramMetricImpl execTime)
        Creates a new service with the given initial parameters. NOTE: There is a known bug. If 'corePoolSize' equals 0, then the pool will degrade to a single-threaded pool.
        Parameters:
        corePoolSize - The number of threads to keep in the pool, even if they are idle.
        maxPoolSize - The maximum number of threads to allow in the pool.
        keepAliveTime - When the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating.
        workQ - The queue to use for holding tasks before they are executed. This queue will hold only the runnable tasks submitted by the ThreadPoolExecutor.execute(Runnable) method.
        threadFactory - Thread factory.
        execTime - Task execution time metric.