Class AutoCloseableExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- nonapi.io.github.classgraph.concurrency.AutoCloseableExecutorService
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
public class AutoCloseableExecutorService extends java.util.concurrent.ThreadPoolExecutor implements java.lang.AutoCloseable
A ThreadPoolExecutor that can be used in a try-with-resources block.
-
-
Nested Class Summary
-
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
Constructors Constructor Description AutoCloseableExecutorService(int numThreads)
A ThreadPoolExecutor that can be used in a try-with-resources block.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Shut down thread pool on close().-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
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
-
-