Package org.elasticsearch.threadpool
Class ScalingExecutorBuilder
java.lang.Object
org.elasticsearch.threadpool.ExecutorBuilder<org.elasticsearch.threadpool.ScalingExecutorBuilder.ScalingExecutorSettings>
org.elasticsearch.threadpool.ScalingExecutorBuilder
public final class ScalingExecutorBuilder
extends ExecutorBuilder<org.elasticsearch.threadpool.ScalingExecutorBuilder.ScalingExecutorSettings>
A builder for scaling executors.
-
Constructor Summary
ConstructorDescriptionScalingExecutorBuilder
(String name, int core, int max, org.elasticsearch.core.TimeValue keepAlive, boolean rejectAfterShutdown) Construct a scaling executor builder; the settings will have the key prefix "thread_pool." followed by the executor name.ScalingExecutorBuilder
(String name, int core, int max, org.elasticsearch.core.TimeValue keepAlive, boolean rejectAfterShutdown, String prefix) Construct a scaling executor builder; the settings will have the specified key prefix. -
Method Summary
Modifier and TypeMethodDescriptionThe list of settings this builder will register.Methods inherited from class org.elasticsearch.threadpool.ExecutorBuilder
applyHardSizeLimit, name, settingsKey
-
Constructor Details
-
ScalingExecutorBuilder
public ScalingExecutorBuilder(String name, int core, int max, org.elasticsearch.core.TimeValue keepAlive, boolean rejectAfterShutdown) Construct a scaling executor builder; the settings will have the key prefix "thread_pool." followed by the executor name.- Parameters:
name
- the name of the executorcore
- the minimum number of threads in the poolmax
- the maximum number of threads in the poolkeepAlive
- the time that spare threads abovecore
threads will be kept aliverejectAfterShutdown
- set totrue
if the executor should reject tasks after shutdown
-
ScalingExecutorBuilder
public ScalingExecutorBuilder(String name, int core, int max, org.elasticsearch.core.TimeValue keepAlive, boolean rejectAfterShutdown, String prefix) Construct a scaling executor builder; the settings will have the specified key prefix.- Parameters:
name
- the name of the executorcore
- the minimum number of threads in the poolmax
- the maximum number of threads in the poolkeepAlive
- the time that spare threads abovecore
threads will be kept aliveprefix
- the prefix for the settings keysrejectAfterShutdown
- set totrue
if the executor should reject tasks after shutdown
-
-
Method Details
-
getRegisteredSettings
Description copied from class:ExecutorBuilder
The list of settings this builder will register.- Specified by:
getRegisteredSettings
in classExecutorBuilder<org.elasticsearch.threadpool.ScalingExecutorBuilder.ScalingExecutorSettings>
- Returns:
- the list of registered settings
-