@Test void update() { ElasticsearchSettings settings = new ElasticsearchSettings(clusterSettings); ByteSizeValue oldValue = settings.getSettingValue(Settings.Key.PPL_QUERY_MEMORY_LIMIT); ElasticsearchSettings.Updater updater = settings.new Updater(Settings.Key.PPL_QUERY_MEMORY_LIMIT); updater.accept(new ByteSizeValue(0L)); ByteSizeValue newValue = settings.getSettingValue(Settings.Key.PPL_QUERY_MEMORY_LIMIT); assertNotEquals(newValue.getBytes(), oldValue.getBytes()); }
@SuppressWarnings("unchecked") @Override public <T> T getSettingValue(Settings.Key key) { return (T) latestSettings.getOrDefault(key, defaultSettings.get(key).getDefault(EMPTY)); }
ElasticsearchSettings extends Settings { @SuppressWarnings("unchecked") @Override public <T> T getSettingValue(Settings.Key key) { return (T) latestSettings.getOrDefault(key, defaultSettings.get(key).getDefault(EMPTY)); } }
ElasticsearchSettings extends Settings { @SuppressWarnings("unchecked") @Override public <T> T getSettingValue(Settings.Key key) { return (T) latestSettings.getOrDefault(key, defaultSettings.get(key).getDefault(EMPTY)); } ElasticsearchSettings(ClusterSettings clusterSettings); }
ElasticsearchSettings extends Settings { @SuppressWarnings("unchecked") @Override public <T> T getSettingValue(Settings.Key key) { return (T) latestSettings.getOrDefault(key, defaultSettings.get(key).getDefault(EMPTY)); } ElasticsearchSettings(ClusterSettings clusterSettings); @SuppressWarnings("unchecked") @Override T getSettingValue(Settings.Key key); static List<Setting<?>> pluginSettings(); }
ElasticsearchSettings extends Settings { @SuppressWarnings("unchecked") @Override public <T> T getSettingValue(Settings.Key key) { return (T) latestSettings.getOrDefault(key, defaultSettings.get(key).getDefault(EMPTY)); } ElasticsearchSettings(ClusterSettings clusterSettings); @SuppressWarnings("unchecked") @Override T getSettingValue(Settings.Key key); static List<Setting<?>> pluginSettings();  }