static class TestAsyncProcess.MyThreadPoolExecutor extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
MyThreadPoolExecutor(int coreThreads,
int maxThreads,
long keepAliveTime,
TimeUnit timeunit,
BlockingQueue<Runnable> blockingqueue) |
| Modifier and Type | Method and Description |
|---|---|
Future |
submit(Runnable runnable) |
afterExecute, 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, shutdownNow, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submitpublic MyThreadPoolExecutor(int coreThreads, int maxThreads, long keepAliveTime, TimeUnit timeunit, BlockingQueue<Runnable> blockingqueue)
public Future submit(Runnable runnable)
submit in interface ExecutorServicesubmit in class AbstractExecutorServiceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.