public class JRebirthThreadPoolExecutor extends ThreadPoolExecutor implements ConcurrentMessages
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Modifier and Type | Field and Description |
|---|---|
private static JRLogger |
LOGGER
The class logger.
|
private List<JRebirthRunnable> |
pending
The pending list of JRebirthRunnable.
|
BOOT_UP_ERROR, FUTURE_DONE, HPTP_QUEUED, JIT_ERROR, JTP_ERROR, JTP_ERROR_EXPLANATION, JTP_QUEUED, RUN_IT, SHUTDOWN_ERROR, THREAD_ERROR| Constructor and Description |
|---|
JRebirthThreadPoolExecutor(int threadNumber,
ThreadFactory threadFactory)
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
boolean |
checkAvailability(RunnablePriority taskPriority)
Check if a slot is available for the given task priority.
|
private boolean |
checkPriority(RunnablePriority taskPriority)
Check given priority with current pending list.
|
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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitprivate static final JRLogger LOGGER
private final List<JRebirthRunnable> pending
public JRebirthThreadPoolExecutor(int threadNumber,
ThreadFactory threadFactory)
threadNumber - the number of thread managed by the poolthreadFactory - the factory used to add a thread into the poolpublic boolean checkAvailability(RunnablePriority taskPriority)
taskPriority - the priority to checkprivate boolean checkPriority(RunnablePriority taskPriority)
taskPriority - the priority to checkprotected void beforeExecute(Thread t, Runnable r)
beforeExecute in class ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorCopyright © 2011–2014 JRebirth OSS. All rights reserved.