Package com.mapr.baseutils.threadpool
Class GrowingThreadPool
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
com.mapr.baseutils.threadpool.GrowingThreadPool
- All Implemented Interfaces:
HealthCheck,Executor,ExecutorService
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidchangeGrowthRate(ThreadPoolGrowth[] newGrowth) intvoidvoidsetBacklog(int val) voidsetMaxPoolSize(int maxSize) 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, toStringMethods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
Constructor Details
-
GrowingThreadPool
-
-
Method Details
-
changeGrowthRate
-
setMaxPoolSize
public void setMaxPoolSize(int maxSize) -
setBacklog
public void setBacklog(int val) -
getNumOfFreeSlots
public int getNumOfFreeSlots() -
canProcessRequest
public boolean canProcessRequest() -
healthCheck
public void healthCheck()- Specified by:
healthCheckin interfaceHealthCheck
-