Class JavaThreadPoolFeature
- java.lang.Object
-
- ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
-
- ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature.WithTaskAdvice
-
- ch.raffael.meldioc.library.base.threading.JavaThreadPoolFeature
-
- All Implemented Interfaces:
TaskAdviceFeature,ThreadingFeature
- Direct Known Subclasses:
JavaThreadPoolFeature.WithShutdown
@Feature @Prefix("workers") public abstract class JavaThreadPoolFeature extends AbstractThreadingFeature.WithTaskAdviceAThreadingFeaturethat 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 class ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
AbstractThreadingFeature.WithTaskAdvice
-
Nested classes/interfaces inherited from interface ch.raffael.meldioc.library.base.threading.TaskAdviceFeature
TaskAdviceFeature.Profile
-
Nested classes/interfaces inherited from interface ch.raffael.meldioc.library.base.threading.ThreadingFeature
ThreadingFeature.Util, ThreadingFeature.WithSystemForkJoinPool
-
-
Field Summary
-
Fields inherited from class ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
workExecutorProvider
-
-
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.ExecutorServiceworkExecutorImplementation()-
Methods inherited from class ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature.WithTaskAdvice
taskAdvice, taskAdviceProfile
-
Methods inherited from class ch.raffael.meldioc.library.base.threading.AbstractThreadingFeature
unrestrictedWorkExecutor, 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()
-
workExecutorImplementation
@Provision(singleton=true) protected java.util.concurrent.ExecutorService workExecutorImplementation()
- Overrides:
workExecutorImplementationin 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()
-
-