org.compass.core.util.concurrent
Class ScalingThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.compass.core.util.concurrent.ScalingThreadPoolExecutor
- All Implemented Interfaces:
- Executor, ExecutorService
public class ScalingThreadPoolExecutor
- extends ThreadPoolExecutor
Extends a ThreadPoolExecutor and gives better performance
when asking for the getActiveCount().
- Author:
- kimchy
| Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
awaitTermination, execute, finalize, 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 |
ScalingThreadPoolExecutor
public ScalingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue)
getActiveCount
public int getActiveCount()
- Overrides:
getActiveCount in class ThreadPoolExecutor
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
Copyright (c) 2004-2008 The Compass Project.