com.planet_ink.coffee_mud.core.threads
Class CMThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by com.planet_ink.coffee_mud.core.threads.CMThreadPoolExecutor
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService

public class CMThreadPoolExecutor
extends java.util.concurrent.ThreadPoolExecutor


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
protected  PairSVector<java.lang.Thread,CMRunnable> active
           
protected  CMThreadFactory threadFactory
           
protected  long timeoutMillis
           
 
Constructor Summary
CMThreadPoolExecutor(java.lang.String poolName, int corePoolSize, int maximumPoolSize, long keepAliveTime, java.util.concurrent.TimeUnit unit, long timeoutMins, int queueSize)
           
 
Method Summary
protected  void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
           
protected  void beforeExecute(java.lang.Thread t, java.lang.Runnable r)
           
 java.util.Collection<CMRunnable> getTimeoutOutRuns()
           
 
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
 
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
 

Field Detail

timeoutMillis

protected long timeoutMillis

threadFactory

protected CMThreadFactory threadFactory

active

protected PairSVector<java.lang.Thread,CMRunnable> active
Constructor Detail

CMThreadPoolExecutor

public CMThreadPoolExecutor(java.lang.String poolName,
                            int corePoolSize,
                            int maximumPoolSize,
                            long keepAliveTime,
                            java.util.concurrent.TimeUnit unit,
                            long timeoutMins,
                            int queueSize)
Method Detail

beforeExecute

protected void beforeExecute(java.lang.Thread t,
                             java.lang.Runnable r)
Overrides:
beforeExecute in class java.util.concurrent.ThreadPoolExecutor

afterExecute

protected void afterExecute(java.lang.Runnable r,
                            java.lang.Throwable t)
Overrides:
afterExecute in class java.util.concurrent.ThreadPoolExecutor

getTimeoutOutRuns

public java.util.Collection<CMRunnable> getTimeoutOutRuns()