Interface ThreadPoolManager


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

      • get

        ThreadPool get​(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,
                          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