net.sf.seide.thread
Class DispatcherThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by net.sf.seide.thread.DispatcherThreadPoolExecutor
All Implemented Interfaces:
Executor, ExecutorService, JMXConfigurableThreadPoolExecutor, JMXEnabledThreadPoolExecutor

public class DispatcherThreadPoolExecutor
extends ThreadPoolExecutor
implements JMXEnabledThreadPoolExecutor, JMXConfigurableThreadPoolExecutor

Dispatcher friendly ThreadPoolExecutor subclass to provide JMX access to internal values and allows to configure the

Author:
german.kondolf
See Also:
ThreadPoolExecutor}

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
DispatcherThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
           
DispatcherThreadPoolExecutor(String namePrefix)
           
DispatcherThreadPoolExecutor(String namePrefix, int corePoolSize, int maxPoolSize)
           
DispatcherThreadPoolExecutor(String namePrefix, int corePoolSize, int maximumPoolSize, int maxQueueSize, RejectedExecutionHandler handler)
           
 
Method Summary
 long getCompletedTasks()
          Get the number of completed tasks
 long getPendingTasks()
          Get the number of tasks waiting to be executed
 
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
 
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
 
Methods inherited from interface net.sf.seide.thread.JMXConfigurableThreadPoolExecutor
getCorePoolSize, setCorePoolSize
 
Methods inherited from interface net.sf.seide.thread.JMXEnabledThreadPoolExecutor
getActiveCount
 

Constructor Detail

DispatcherThreadPoolExecutor

public DispatcherThreadPoolExecutor(String namePrefix)

DispatcherThreadPoolExecutor

public DispatcherThreadPoolExecutor(String namePrefix,
                                    int corePoolSize,
                                    int maxPoolSize)

DispatcherThreadPoolExecutor

public DispatcherThreadPoolExecutor(String namePrefix,
                                    int corePoolSize,
                                    int maximumPoolSize,
                                    int maxQueueSize,
                                    RejectedExecutionHandler handler)

DispatcherThreadPoolExecutor

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

getCompletedTasks

public long getCompletedTasks()
Description copied from interface: JMXEnabledThreadPoolExecutor
Get the number of completed tasks

Specified by:
getCompletedTasks in interface JMXEnabledThreadPoolExecutor

getPendingTasks

public long getPendingTasks()
Description copied from interface: JMXEnabledThreadPoolExecutor
Get the number of tasks waiting to be executed

Specified by:
getPendingTasks in interface JMXEnabledThreadPoolExecutor


Copyright © 2011. All Rights Reserved.