org.eclipse.net4j.util.concurrent

## Class ThreadPool

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - org.eclipse.net4j.util.concurrent.ThreadPool

- All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.RejectedExecutionHandler

      public class ThreadPool
      extends java.util.concurrent.ThreadPoolExecutor
      implements java.util.concurrent.RejectedExecutionHandler

  Since:
    3.6
  Author:
    Eike Stepper

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

      `java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_CORE_POOL_SIZE`
    `static long` | `DEFAULT_KEEP_ALIVE_SECONDS`
    `static int` | `DEFAULT_MAXIMUM_POOL_SIZE`
    `static java.lang.String` | `DEFAULT_THREAD_GROUP_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.ThreadFactory threadFactory)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ThreadPool` | `create()`
    `static ThreadPool` | `create(java.lang.String description)`
    `static ThreadPool` | `create(java.lang.String threadGroupName, int corePoolSize, int maximumPoolSize, long keepAliveSeconds)`
    `void` | `rejectedExecution(java.lang.Runnable runnable, java.util.concurrent.ThreadPoolExecutor executor)`

    - ### Methods inherited from class java.util.concurrent.ThreadPoolExecutor

      `afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString`

    - ### Methods inherited from class java.util.concurrent.AbstractExecutorService

      `invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_THREAD_GROUP_NAME

          public static final java.lang.String DEFAULT_THREAD_GROUP_NAME

      See Also:
        Constant Field Values

    - #### DEFAULT_CORE_POOL_SIZE

          public static final int DEFAULT_CORE_POOL_SIZE

      See Also:
        Constant Field Values

    - #### DEFAULT_MAXIMUM_POOL_SIZE

          public static final int DEFAULT_MAXIMUM_POOL_SIZE

      See Also:
        Constant Field Values

    - #### DEFAULT_KEEP_ALIVE_SECONDS

          public static final long DEFAULT_KEEP_ALIVE_SECONDS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ThreadPool

          public ThreadPool(int corePoolSize,
                            int maximumPoolSize,
                            long keepAliveTime,
                            java.util.concurrent.ThreadFactory threadFactory)

  - ### Method Detail

    - #### rejectedExecution

          public void rejectedExecution(java.lang.Runnable runnable,
                                        java.util.concurrent.ThreadPoolExecutor executor)

      Specified by:
        `rejectedExecution` in interface `java.util.concurrent.RejectedExecutionHandler`

    - #### create

          public static ThreadPool create()

    - #### create

          public static ThreadPool create(java.lang.String description)

    - #### create

          public static ThreadPool create(java.lang.String threadGroupName,
                                          int corePoolSize,
                                          int maximumPoolSize,
                                          long keepAliveSeconds)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html