Package ratpack.exec
Interface ExecControllerSpec.ExecutorServiceSpec
-
- All Known Subinterfaces:
ExecControllerSpec.BlockingSpec
- Enclosing interface:
- ExecControllerSpec
public static interface ExecControllerSpec.ExecutorServiceSpec
A specification for building executor services
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecControllerSpec.ExecutorServiceSpec
executor(Function<ThreadFactory,ExecutorService> executorFactory)
Specify a factory for creating an executor service with the provider arguments.ExecControllerSpec.ExecutorServiceSpec
prefix(String prefix)
Specify the thread name prefix to use for threads created by this executor service.ExecControllerSpec.ExecutorServiceSpec
priority(int priority)
Specify the thread priority for threads created by this executor service.
-
-
-
Method Detail
-
prefix
ExecControllerSpec.ExecutorServiceSpec prefix(String prefix)
Specify the thread name prefix to use for threads created by this executor service.- Parameters:
prefix
- the thread name prefix- Returns:
this
-
priority
ExecControllerSpec.ExecutorServiceSpec priority(int priority)
Specify the thread priority for threads created by this executor service.- Parameters:
priority
- the thread priority.- Returns:
this
- See Also:
Thread.MAX_PRIORITY
,Thread.MIN_PRIORITY
,Thread.NORM_PRIORITY
-
executor
ExecControllerSpec.ExecutorServiceSpec executor(Function<ThreadFactory,ExecutorService> executorFactory)
Specify a factory for creating an executor service with the provider arguments.The default value for this factory is
::newCachedThreadPool
- Parameters:
executorFactory
- the executor service factory- Returns:
this
-
-