org.jgroups.util

## Class ThreadManagerThreadPoolExecutor

- java.lang.Object
- - java.util.concurrent.AbstractExecutorService
  - - java.util.concurrent.ThreadPoolExecutor
    - - org.jgroups.util.ThreadManagerThreadPoolExecutor

All Implemented Interfaces:
  java.util.concurrent.Executor, java.util.concurrent.ExecutorService, ThreadManager

    public class ThreadManagerThreadPoolExecutor
    extends java.util.concurrent.ThreadPoolExecutor
    implements ThreadManager

ThreadPoolExecutor subclass that implements @{link ThreadManager}.

Author:
  Brian Stansberry

### 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`

### Constructor Summary

Constructors
Constructor and Description
`ThreadManagerThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue)`
`ThreadManagerThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, java.util.concurrent.RejectedExecutionHandler handler)`
`ThreadManagerThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, java.util.concurrent.ThreadFactory threadFactory)`
`ThreadManagerThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.RejectedExecutionHandler handler)`

### Method Summary

Methods
`protected void` `afterExecute(java.lang.Runnable r, java.lang.Throwable t)` Invokes `ThreadDecorator.threadReleased(Thread)` on the current thread.
`ThreadDecorator` `getThreadDecorator()` Gets the ThreadDecorator associated with this manager.
`void` `setThreadDecorator(ThreadDecorator decorator)` Sets the ThreadDecorator associated this manager should use.

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

`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`

### 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, toString, wait, wait, wait`

### Constructor Detail

#### ThreadManagerThreadPoolExecutor

    public ThreadManagerThreadPoolExecutor(int corePoolSize,
                                   int maximumPoolSize,
                                   long keepAliveTime,
                                   java.util.concurrent.TimeUnit unit,
                                   java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue)

#### ThreadManagerThreadPoolExecutor

    public ThreadManagerThreadPoolExecutor(int corePoolSize,
                                   int maximumPoolSize,
                                   long keepAliveTime,
                                   java.util.concurrent.TimeUnit unit,
                                   java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
                                   java.util.concurrent.ThreadFactory threadFactory)

#### ThreadManagerThreadPoolExecutor

    public ThreadManagerThreadPoolExecutor(int corePoolSize,
                                   int maximumPoolSize,
                                   long keepAliveTime,
                                   java.util.concurrent.TimeUnit unit,
                                   java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
                                   java.util.concurrent.RejectedExecutionHandler handler)

#### ThreadManagerThreadPoolExecutor

    public ThreadManagerThreadPoolExecutor(int corePoolSize,
                                   int maximumPoolSize,
                                   long keepAliveTime,
                                   java.util.concurrent.TimeUnit unit,
                                   java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
                                   java.util.concurrent.ThreadFactory threadFactory,
                                   java.util.concurrent.RejectedExecutionHandler handler)

### Method Detail

#### getThreadDecorator

    public ThreadDecorator getThreadDecorator()

Description copied from interface: `ThreadManager`
Gets the ThreadDecorator associated with this manager.

Specified by:
  `getThreadDecorator` in interface `ThreadManager`
Returns:
  the ThreadDecorator, or `null` if there is none.

#### setThreadDecorator

    public void setThreadDecorator(ThreadDecorator decorator)

Description copied from interface: `ThreadManager`
Sets the ThreadDecorator associated this manager should use.

Specified by:
  `setThreadDecorator` in interface `ThreadManager`
Parameters:
  `decorator` - the ThreadDecorator, or `null`.

#### afterExecute

    protected void afterExecute(java.lang.Runnable r,
                    java.lang.Throwable t)

Invokes `ThreadDecorator.threadReleased(Thread)` on the current thread.

Overrides:
  `afterExecute` in class `java.util.concurrent.ThreadPoolExecutor`