com.atlassian.bamboo.event.spi
Class EventLoggingThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
com.atlassian.bamboo.event.spi.EventLoggingThreadPoolExecutor
- All Implemented Interfaces:
- java.util.concurrent.Executor, java.util.concurrent.ExecutorService
public class EventLoggingThreadPoolExecutor
- extends java.util.concurrent.ThreadPoolExecutor
A specialised thread pool executor that logs what the workers are doing.
- Since:
- v4.0
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
Constructor Summary |
EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue)
|
EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.RejectedExecutionHandler handler)
|
EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory)
|
EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler handler)
|
Method Summary |
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
|
protected void |
beforeExecute(java.lang.Thread t,
java.lang.Runnable r)
|
java.util.concurrent.ConcurrentMap<java.lang.String,Pair<java.lang.Runnable,java.util.Date>> |
getThreadToRunnableMappings()
|
protected
<T> java.util.concurrent.RunnableFuture<T> |
|
newTaskFor(java.util.concurrent.Callable<T> callable)
|
protected
<T> java.util.concurrent.RunnableFuture<T> |
|
newTaskFor(java.lang.Runnable runnable,
T value)
|
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
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 |
Methods inherited from class java.util.concurrent.AbstractExecutorService |
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventLoggingThreadPoolExecutor
public EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue)
EventLoggingThreadPoolExecutor
public EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory)
EventLoggingThreadPoolExecutor
public EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.RejectedExecutionHandler handler)
EventLoggingThreadPoolExecutor
public EventLoggingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler handler)
beforeExecute
protected void beforeExecute(java.lang.Thread t,
java.lang.Runnable r)
- Overrides:
beforeExecute
in class java.util.concurrent.ThreadPoolExecutor
afterExecute
protected void afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
- Overrides:
afterExecute
in class java.util.concurrent.ThreadPoolExecutor
getThreadToRunnableMappings
public java.util.concurrent.ConcurrentMap<java.lang.String,Pair<java.lang.Runnable,java.util.Date>> getThreadToRunnableMappings()
newTaskFor
protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor(java.util.concurrent.Callable<T> callable)
- Overrides:
newTaskFor
in class java.util.concurrent.AbstractExecutorService
newTaskFor
protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor(java.lang.Runnable runnable,
T value)
- Overrides:
newTaskFor
in class java.util.concurrent.AbstractExecutorService
Copyright © 2012 Atlassian. All Rights Reserved.