org.elasticsearch.common.settings.Settings.getAsStructuredMap()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.elasticsearch.common.settings.Settings.getAsStructuredMap()方法的一些代码示例,展示了Settings.getAsStructuredMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.getAsStructuredMap()方法的具体详情如下:
包路径:org.elasticsearch.common.settings.Settings
类名称:Settings
方法名:getAsStructuredMap

Settings.getAsStructuredMap介绍

[英]The settings as a structured java.util.Map.
[中]将这些设置设置为结构化java。util。地图

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
  Settings settings = SettingsFilter.filterSettings(params, this);
  if (!params.paramAsBoolean("flat_settings", false)) {
    for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  } else {
    for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  }
  return builder;
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
  Settings settings = SettingsFilter.filterSettings(params, this);
  if (!params.paramAsBoolean("flat_settings", false)) {
    for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  } else {
    for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  }
  return builder;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
  Settings settings = SettingsFilter.filterSettings(params, this);
  if (!params.paramAsBoolean("flat_settings", false)) {
    for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  } else {
    for (Map.Entry<String, Object> entry : settings.settings.entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  }
  return builder;
}

代码示例来源:origin: harbby/presto-connectors

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
  Settings settings = SettingsFilter.filterSettings(params, this);
  if (!params.paramAsBoolean("flat_settings", false)) {
    for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  } else {
    for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue(), XContentBuilder.FieldCaseConversion.NONE);
    }
  }
  return builder;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
  Settings settings = SettingsFilter.filterSettings(params, this);
  if (!params.paramAsBoolean("flat_settings", false)) {
    for (Map.Entry<String, Object> entry : settings.getAsStructuredMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  } else {
    for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
      builder.field(entry.getKey(), entry.getValue());
    }
  }
  return builder;
}

代码示例来源:origin: io.fabric8.insight/insight-elasticsearch

try {
  Settings settings = IndicesManagementService.this.settings.getByPrefix("insight.indices.management.");
  Set<String> repositories = settings.getByPrefix("repository.").getAsStructuredMap().keySet();
  int opened = settings.getAsInt("opened", 7);
  int closed = settings.getAsInt("closed", 14);

相关文章