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, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit
public MyThreadPoolExecutor(int coreThreads, int maxThreads, long keepAliveTime, TimeUnit timeunit, BlockingQueue<Runnable> blockingqueue)
public Future submit(Runnable runnable)
submit
in interface ExecutorService
submit
in class AbstractExecutorService
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.