Class 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}.
    Version:
    $Id: ThreadManagerThreadPoolExecutor.java,v 1.1.2.1 2008/05/26 09:14:39 belaban Exp $
    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 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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, 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 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

      • 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