Interface ThreadPool

All Superinterfaces:
Executor
All Known Subinterfaces:
ThreadPool.SizedThreadPool
All Known Implementing Classes:
ExecutorSizedThreadPool, ExecutorThreadPool, MonitoredQueuedThreadPool, QueuedThreadPool

@ManagedObject("Pool of Threads") @Deprecated(since="2021-05-27") public interface ThreadPool extends Executor
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

A pool for threads.

A specialization of Executor interface that provides reporting methods (eg getThreads()) and the option of configuration methods (e.g. @link ThreadPool.SizedThreadPool.setMaxThreads(int)).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated.
     
    int
    Deprecated.
     
    boolean
    Deprecated.
     
    void
    Deprecated.
    Blocks until the thread pool is stopped.

    Methods inherited from interface java.util.concurrent.Executor

    execute
  • Method Details

    • join

      void join() throws InterruptedException
      Deprecated.
      Blocks until the thread pool is stopped.
      Throws:
      InterruptedException - if thread was interrupted
    • getThreads

      @ManagedAttribute("number of threads in pool") int getThreads()
      Deprecated.
      Returns:
      The total number of threads currently in the pool
    • getIdleThreads

      @ManagedAttribute("number of idle threads in pool") int getIdleThreads()
      Deprecated.
      Returns:
      The number of idle threads in the pool
    • isLowOnThreads

      @ManagedAttribute("indicates the pool is low on available threads") boolean isLowOnThreads()
      Deprecated.
      Returns:
      True if the pool is low on threads