Class DaemonPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.ojalgo.concurrent.DaemonPoolExecutor
- All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService
-
Nested Class Summary
Nested classes/interfaces inherited from class ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AtomicIntegerprivate static final ThreadGroup(package private) static final DaemonPoolExecutor -
Constructor Summary
ConstructorsConstructorDescriptionDaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionstatic Future<?> static <T> Future<T> static <T> Future<T> static ExecutorServicenewCachedThreadPool(String name) LikeExecutors.newCachedThreadPool()but with identifiable (daemon) threadsstatic ExecutorServicenewFixedThreadPool(String name, int nThreads) LikeExecutors.newFixedThreadPool(int)but with identifiable (daemon) threads(package private) static ThreadFactoryCreate aThreadFactoryproducingProcessAwareThreads.static ScheduledExecutorServicenewScheduledThreadPool(String name, int corePoolSize) LikeExecutors.newScheduledThreadPool(int)but with identifiable (daemon) threadsstatic ExecutorServiceLikeExecutors.newSingleThreadExecutor()but with identifiable (daemon) threadsstatic ScheduledExecutorServiceLikeExecutors.newSingleThreadScheduledExecutor()but with identifiable (daemon) threadsstatic ThreadFactorynewThreadFactory(String name) static ThreadFactorynewThreadFactory(ThreadGroup group, String name) Methods inherited from class 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, toStringMethods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ExecutorService
close
-
Field Details
-
COUNTER
-
GROUP
-
INSTANCE
-
-
Constructor Details
-
DaemonPoolExecutor
DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) -
DaemonPoolExecutor
DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) -
DaemonPoolExecutor
DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) -
DaemonPoolExecutor
DaemonPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
-
-
Method Details
-
invoke
-
invoke
-
invoke
-
newCachedThreadPool
LikeExecutors.newCachedThreadPool()but with identifiable (daemon) threads -
newFixedThreadPool
LikeExecutors.newFixedThreadPool(int)but with identifiable (daemon) threads -
newScheduledThreadPool
LikeExecutors.newScheduledThreadPool(int)but with identifiable (daemon) threads -
newSingleThreadExecutor
LikeExecutors.newSingleThreadExecutor()but with identifiable (daemon) threads -
newSingleThreadScheduledExecutor
LikeExecutors.newSingleThreadScheduledExecutor()but with identifiable (daemon) threads -
newThreadFactory
-
newThreadFactory
-
newProcessAwareThreadFactory
Create aThreadFactoryproducingProcessAwareThreads. These threads are daemon threads and can be used to "own" an external process: if the thread is interrupted, the process is forcibly destroyed.
-