public class LogThreadPoolExecutor extends ThreadPoolExecutor
ExecutorService that witch can print
error message for failed execution.ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
LogThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
String |
getName() |
protected void |
terminated() |
String |
toString() |
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, shutdownNowinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic LogThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String name)
public String getName()
protected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorprotected void terminated()
terminated in class ThreadPoolExecutorpublic String toString()
toString in class ThreadPoolExecutorCopyright © 2023. All rights reserved.