public class CountingThreadPoolExecutor extends ThreadPoolExecutor
Modifier and Type | Class and Description |
---|---|
static interface |
CountingThreadPoolExecutor.Listener |
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
CountingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue) |
CountingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
RejectedExecutionHandler handler) |
CountingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory) |
CountingThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(CountingThreadPoolExecutor.Listener listener) |
protected void |
afterExecute(Runnable r,
Throwable t) |
void |
execute(Runnable command) |
protected void |
fireCountChanged(int count) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
remove(Runnable task) |
void |
removeListener(CountingThreadPoolExecutor.Listener listener) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
protected void |
updateCount() |
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
newTaskFor, newTaskFor
public CountingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)
public CountingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
public CountingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)
public CountingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
public void addListener(CountingThreadPoolExecutor.Listener listener)
public void removeListener(CountingThreadPoolExecutor.Listener listener)
protected void fireCountChanged(int count)
protected void updateCount()
protected void afterExecute(Runnable r, Throwable t)
afterExecute
in class ThreadPoolExecutor
public void shutdown()
shutdown
in interface ExecutorService
shutdown
in class ThreadPoolExecutor
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
shutdownNow
in class ThreadPoolExecutor
public boolean remove(Runnable task)
remove
in class ThreadPoolExecutor
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
invokeAny
in class AbstractExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
invokeAny
in class AbstractExecutorService
InterruptedException
ExecutionException
TimeoutException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class AbstractExecutorService
InterruptedException
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
invokeAll
in class AbstractExecutorService
InterruptedException
public void execute(Runnable command)
execute
in interface Executor
execute
in class ThreadPoolExecutor
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.