@@ -51,28 +51,7 @@ public final class FixedExecutorBuilder extends ExecutorBuilder<FixedExecutorBui
51
51
* @param trackEWMA whether to track the exponentially weighted moving average of the task execution time
52
52
*/
53
53
FixedExecutorBuilder (final Settings settings , final String name , final int size , final int queueSize , final boolean trackEWMA ) {
54
- this (settings , name , size , queueSize , trackEWMA , false );
55
- }
56
-
57
- /**
58
- * Construct a fixed executor builder; the settings will have the key prefix "thread_pool." followed by the executor name.
59
- *
60
- * @param settings the node-level settings
61
- * @param name the name of the executor
62
- * @param size the fixed number of threads
63
- * @param queueSize the size of the backing queue, -1 for unbounded
64
- * @param trackEWMA whether to track the exponentially weighted moving average of the task execution time
65
- * @param deprecated whether or not the thread pool is deprecated
66
- */
67
- FixedExecutorBuilder (
68
- final Settings settings ,
69
- final String name ,
70
- final int size ,
71
- final int queueSize ,
72
- final boolean trackEWMA ,
73
- final boolean deprecated
74
- ) {
75
- this (settings , name , size , queueSize , "thread_pool." + name , trackEWMA , deprecated );
54
+ this (settings , name , size , queueSize , "thread_pool." + name , trackEWMA );
76
55
}
77
56
78
57
/**
@@ -87,45 +66,16 @@ public final class FixedExecutorBuilder extends ExecutorBuilder<FixedExecutorBui
87
66
*/
88
67
public FixedExecutorBuilder (final Settings settings , final String name , final int size , final int queueSize , final String prefix ,
89
68
final boolean trackEWMA ) {
90
- this (settings , name , size , queueSize , prefix , trackEWMA , false );
91
- }
92
-
93
- /**
94
- * Construct a fixed executor builder.
95
- *
96
- * @param settings the node-level settings
97
- * @param name the name of the executor
98
- * @param size the fixed number of threads
99
- * @param queueSize the size of the backing queue, -1 for unbounded
100
- * @param prefix the prefix for the settings keys
101
- * @param trackEWMA whether to track the exponentially weighted moving average of the task execution time
102
- * @param deprecated whether or not the thread pool is deprecated
103
- */
104
- public FixedExecutorBuilder (
105
- final Settings settings ,
106
- final String name ,
107
- final int size ,
108
- final int queueSize ,
109
- final String prefix ,
110
- final boolean trackEWMA ,
111
- final boolean deprecated
112
- ) {
113
69
super (name );
114
70
final String sizeKey = settingsKey (prefix , "size" );
115
- final Setting .Property [] properties ;
116
- if (deprecated ) {
117
- properties = new Setting .Property []{Setting .Property .NodeScope , Setting .Property .Deprecated };
118
- } else {
119
- properties = new Setting .Property []{Setting .Property .NodeScope };
120
- }
121
71
this .sizeSetting =
122
- new Setting <>(
123
- sizeKey ,
124
- s -> Integer .toString (size ),
125
- s -> Setting .parseInt (s , 1 , applyHardSizeLimit (settings , name ), sizeKey ),
126
- properties );
72
+ new Setting <>(
73
+ sizeKey ,
74
+ s -> Integer .toString (size ),
75
+ s -> Setting .parseInt (s , 1 , applyHardSizeLimit (settings , name ), sizeKey ),
76
+ Setting . Property . NodeScope );
127
77
final String queueSizeKey = settingsKey (prefix , "queue_size" );
128
- this .queueSizeSetting = Setting .intSetting (queueSizeKey , queueSize , properties );
78
+ this .queueSizeSetting = Setting .intSetting (queueSizeKey , queueSize , Setting . Property . NodeScope );
129
79
this .trackEWMA = trackEWMA ;
130
80
}
131
81
0 commit comments