public class NutchServerPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
NutchServerPoolExecutor(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterExecute(Runnable runnable,
Throwable throwable) |
protected void |
beforeExecute(Thread thread,
Runnable runnable) |
JobWorker |
findWorker(String jobId)
Find the Job Worker Thread
|
Collection<JobInfo> |
getAllJobs()
Gives all jobs(currently running and completed)
|
JobInfo |
getInfo(String jobId) |
Collection<JobInfo> |
getJobHistory()
Gives the Job history
|
Collection<JobInfo> |
getJobRunning()
Gives the list of currently running jobs
|
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, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public NutchServerPoolExecutor(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
protected void beforeExecute(Thread thread, Runnable runnable)
beforeExecute
in class ThreadPoolExecutor
protected void afterExecute(Runnable runnable, Throwable throwable)
afterExecute
in class ThreadPoolExecutor
public JobWorker findWorker(String jobId)
jobId
- public Collection<JobInfo> getJobHistory()
public Collection<JobInfo> getJobRunning()
public Collection<JobInfo> getAllJobs()
Copyright © 2015 The Apache Software Foundation