HadoopThreadPoolExecutor (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util.concurrent, class: HadoopThreadPoolExecutor

Package org.apache.hadoop.util.concurrent

# Class HadoopThreadPoolExecutor

java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.apache.hadoop.util.concurrent.HadoopThreadPoolExecutor

All Implemented Interfaces:
  `Executor`, `ExecutorService`

public final class HadoopThreadPoolExecutor extends ThreadPoolExecutor
An extension of ThreadPoolExecutor that provides additional functionality.

- ## Nested Class Summary

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

  `ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)`
  `HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)`
  `HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)`
  `HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `afterExecute(Runnable r, Throwable t)`
  `protected void`
  `beforeExecute(Thread t, Runnable r)`

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

  `allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, 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`

- ## Constructor Details

  - ### HadoopThreadPoolExecutor

    public HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)

  - ### HadoopThreadPoolExecutor

    public HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)

  - ### HadoopThreadPoolExecutor

    public HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)

  - ### HadoopThreadPoolExecutor

    public HadoopThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)

- ## Method Details

  - ### beforeExecute

    protected void beforeExecute(Thread t, Runnable r)
    Overrides:
      `beforeExecute` in class `ThreadPoolExecutor`

  - ### afterExecute

    protected void afterExecute(Runnable r, Throwable t)
    Overrides:
      `afterExecute` in class `ThreadPoolExecutor`