static int twiceNumberOfProcessors(int numberOfProcessors) { return boundedBy(2 * numberOfProcessors, 2, Integer.MAX_VALUE); }
static int halfNumberOfProcessorsMaxFive(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 5); }
static int halfNumberOfProcessorsMaxTen(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 10); }
final int halfProcMaxAt5 = halfNumberOfProcessorsMaxFive(availableProcessors); final int halfProcMaxAt10 = halfNumberOfProcessorsMaxTen(availableProcessors); final int genericThreadPoolMax = boundedBy(4 * availableProcessors, 128, 512); builders.put(Names.GENERIC, new ScalingExecutorBuilder(Names.GENERIC, 4, genericThreadPoolMax, TimeValue.timeValueSeconds(30))); builders.put(Names.INDEX, new FixedExecutorBuilder(settings, Names.INDEX, availableProcessors, 200, true));
static int halfNumberOfProcessorsMaxFive(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 5); }
static int halfNumberOfProcessorsMaxFive(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 5); }
static int twiceNumberOfProcessors(int numberOfProcessors) { return boundedBy(2 * numberOfProcessors, 2, Integer.MAX_VALUE); }
static int twiceNumberOfProcessors(int numberOfProcessors) { return boundedBy(2 * numberOfProcessors, 2, Integer.MAX_VALUE); }
static int twiceNumberOfProcessors(int numberOfProcessors) { return boundedBy(2 * numberOfProcessors, 2, Integer.MAX_VALUE); }
static int halfNumberOfProcessorsMaxTen(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 10); }
static int halfNumberOfProcessorsMaxTen(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 10); }
static int halfNumberOfProcessorsMaxTen(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 10); }
static int halfNumberOfProcessorsMaxFive(int numberOfProcessors) { return boundedBy((numberOfProcessors + 1) / 2, 1, 5); }
final int halfProcMaxAt5 = halfNumberOfProcessorsMaxFive(availableProcessors); final int halfProcMaxAt10 = halfNumberOfProcessorsMaxTen(availableProcessors); final int genericThreadPoolMax = boundedBy(4 * availableProcessors, 128, 512); builders.put(Names.GENERIC, new ScalingExecutorBuilder(Names.GENERIC, 4, genericThreadPoolMax, TimeValue.timeValueSeconds(30))); builders.put(Names.INDEX, new FixedExecutorBuilder(settings, Names.INDEX, availableProcessors, 200, true));
final int halfProcMaxAt5 = halfNumberOfProcessorsMaxFive(availableProcessors); final int halfProcMaxAt10 = halfNumberOfProcessorsMaxTen(availableProcessors); final int genericThreadPoolMax = boundedBy(4 * availableProcessors, 128, 512); builders.put(Names.GENERIC, new ScalingExecutorBuilder(Names.GENERIC, 4, genericThreadPoolMax, TimeValue.timeValueSeconds(30))); builders.put(Names.INDEX, new FixedExecutorBuilder(settings, Names.INDEX, availableProcessors, 200, true));
final int halfProcMaxAt5 = halfNumberOfProcessorsMaxFive(availableProcessors); final int halfProcMaxAt10 = halfNumberOfProcessorsMaxTen(availableProcessors); final int genericThreadPoolMax = boundedBy(4 * availableProcessors, 128, 512); builders.put(Names.GENERIC, new ScalingExecutorBuilder(Names.GENERIC, 4, genericThreadPoolMax, TimeValue.timeValueSeconds(30))); builders.put(Names.INDEX, new FixedExecutorBuilder(settings, Names.INDEX, availableProcessors, 200));