Class JavaThreadPoolFeature
- java.lang.Object
-
- ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
-
- ch.raffael.meldioc.library.base.threading.JavaThreadPoolFeature
-
- All Implemented Interfaces:
ThreadingFeature
- Direct Known Subclasses:
JavaThreadPoolFeature.WithShutdown
@Feature @Prefix("workers") public abstract class JavaThreadPoolFeature extends AbstractThreadingFeatureAThreadingFeaturethat uses a JavaThreadPoolExecutor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJavaThreadPoolFeature.WithShutdownAJavaThreadPoolFeaturethat destroys the thread pool on finalizing the shutdown.-
Nested classes/interfaces inherited from interface ch.raffael.meldioc.library.base.threading.ThreadingFeature
ThreadingFeature.Util, ThreadingFeature.WithSystemForkJoinPool
-
-
Constructor Summary
Constructors Constructor Description JavaThreadPoolFeature()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcorePoolSize()protected java.util.concurrent.BlockingQueue<java.lang.Runnable>createQueue()protected io.vavr.control.Option<? extends java.util.concurrent.RejectedExecutionHandler>createRejectedExecutionHandler()protected java.util.concurrent.ThreadFactorycreateThreadFactory()protected java.time.DurationkeepAliveTime()protected intmaxPoolSize()protected intqueueCapacity()protected io.vavr.control.Option<java.lang.ThreadGroup>threadGroup()protected java.util.concurrent.ExecutorServiceunrestrictedWorkExecutor()-
Methods inherited from class ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
workExecutor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.raffael.meldioc.library.base.threading.ThreadingFeature
forkJoinPool
-
-
-
-
Method Detail
-
corePoolSize
@Parameter protected int corePoolSize()
-
maxPoolSize
@Parameter protected int maxPoolSize()
-
keepAliveTime
@Parameter protected java.time.Duration keepAliveTime()
-
queueCapacity
@Parameter protected int queueCapacity()
-
unrestrictedWorkExecutor
@Provision(shared=true) protected java.util.concurrent.ExecutorService unrestrictedWorkExecutor()
- Specified by:
unrestrictedWorkExecutorin classAbstractThreadingFeature
-
createQueue
protected java.util.concurrent.BlockingQueue<java.lang.Runnable> createQueue()
-
createThreadFactory
protected java.util.concurrent.ThreadFactory createThreadFactory()
-
threadGroup
protected io.vavr.control.Option<java.lang.ThreadGroup> threadGroup()
-
createRejectedExecutionHandler
protected io.vavr.control.Option<? extends java.util.concurrent.RejectedExecutionHandler> createRejectedExecutionHandler()
-
-