Interface ThreadPoolManager


  • @ProviderType
    public interface ThreadPoolManager
    The ThreadPoolManager manages thread pools.
    • Field Detail

      • DEFAULT_THREADPOOL_NAME

        static final java.lang.String DEFAULT_THREADPOOL_NAME
        The default thread pool name
        See Also:
        Constant Field Values
    • Method Detail

      • get

        ThreadPool get​(java.lang.String name)
        Get a thread pool. If there is no thread pool with the given name, a new thread pool with the default configuration is created and returned. A thread pool must be released when not used anymore with the release(ThreadPool) method.
        Parameters:
        name - The name of the thread pool or null for the default pool.
        Returns:
        A thread pool.
      • create

        ThreadPool create​(ThreadPoolConfig config)
        Create a new thread pool with this configuration. A thread pool must be released when not used anymore with the release(ThreadPool) method.
        Parameters:
        config - The thread pool configuration.
        Returns:
        A new thread pool.
      • create

        ThreadPool create​(ThreadPoolConfig config,
                          java.lang.String label)
        Create a new thread pool with this configuration. A thread pool must be released when not used anymore with the release(ThreadPool) method.
        Parameters:
        config - The thread pool configuration.
        label - An optional label for the thread pool. The label will be appended to the name of the pool.
        Returns:
        A new thread pool.
        Since:
        3.1
      • release

        void release​(ThreadPool pool)
        Release the thread pool again.
        Parameters:
        pool - The thread pool to release