class ElasticsearchConfig extends MapConfig {

  public Optional<Integer> getBulkFlushIntervalMS() {
    if (containsKey(CONFIG_KEY_FLUSH_INTERVALS_MS)) {
      int intervalMs = getInt(CONFIG_KEY_FLUSH_INTERVALS_MS);
      if (intervalMs <= 0) {
        throw new ConfigException(String.format("%s must be > 0", CONFIG_KEY_FLUSH_INTERVALS_MS));
      }
      return Optional.of(intervalMs);
    } else {
      return Optional.empty();
    }
  }

  public  ElasticsearchConfig(String name, Config config);

}