mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Remove dead code in EsExecutors (#61574)
Removes a couple of unused methods.
This commit is contained in:
parent
3ed65eb418
commit
f2dc664228
@ -28,7 +28,6 @@ import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.node.Node;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.AbstractExecutorService;
|
||||
@ -44,7 +43,6 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class EsExecutors {
|
||||
|
||||
@ -240,15 +238,6 @@ public class EsExecutors {
|
||||
return DIRECT_EXECUTOR_SERVICE;
|
||||
}
|
||||
|
||||
public static String threadName(Settings settings, String ... names) {
|
||||
String namePrefix =
|
||||
Arrays
|
||||
.stream(names)
|
||||
.filter(name -> name != null)
|
||||
.collect(Collectors.joining(".", "[", "]"));
|
||||
return threadName(settings, namePrefix);
|
||||
}
|
||||
|
||||
public static String threadName(Settings settings, String namePrefix) {
|
||||
if (Node.NODE_NAME_SETTING.exists(settings)) {
|
||||
return threadName(Node.NODE_NAME_SETTING.get(settings), namePrefix);
|
||||
@ -272,10 +261,6 @@ public class EsExecutors {
|
||||
return daemonThreadFactory(threadName(nodeName, namePrefix));
|
||||
}
|
||||
|
||||
public static ThreadFactory daemonThreadFactory(Settings settings, String ... names) {
|
||||
return daemonThreadFactory(threadName(settings, names));
|
||||
}
|
||||
|
||||
public static ThreadFactory daemonThreadFactory(String namePrefix) {
|
||||
return new EsThreadFactory(namePrefix);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user