public class EsThreadPoolExecutor
extends java.util.concurrent.ThreadPoolExecutor
Modifier and Type | Class and Description |
---|---|
static interface |
EsThreadPoolExecutor.ShutdownListener |
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Modifier and Type | Method and Description |
---|---|
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t) |
protected void |
doExecute(java.lang.Runnable command) |
void |
execute(java.lang.Runnable command) |
java.util.stream.Stream<java.lang.Runnable> |
getTasks()
Returns a stream of all pending tasks.
|
void |
shutdown(EsThreadPoolExecutor.ShutdownListener listener) |
protected void |
terminated() |
java.lang.String |
toString() |
protected java.lang.Runnable |
unwrap(java.lang.Runnable runnable) |
protected java.lang.Runnable |
wrapRunnable(java.lang.Runnable command) |
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, 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
public void shutdown(EsThreadPoolExecutor.ShutdownListener listener)
protected void terminated()
terminated
in class java.util.concurrent.ThreadPoolExecutor
public void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
execute
in class java.util.concurrent.ThreadPoolExecutor
protected void doExecute(java.lang.Runnable command)
protected void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
afterExecute
in class java.util.concurrent.ThreadPoolExecutor
public java.util.stream.Stream<java.lang.Runnable> getTasks()
ThreadPoolExecutor.getQueue()
but will expose the originally submitted
Runnable
instances rather than potentially wrapped ones.public java.lang.String toString()
toString
in class java.util.concurrent.ThreadPoolExecutor
protected java.lang.Runnable wrapRunnable(java.lang.Runnable command)
protected java.lang.Runnable unwrap(java.lang.Runnable runnable)