当前位置: 首页>>代码示例>>Java>>正文


Java IndexMetaData.Custom方法代码示例

本文整理汇总了Java中org.elasticsearch.cluster.metadata.IndexMetaData.Custom方法的典型用法代码示例。如果您正苦于以下问题:Java IndexMetaData.Custom方法的具体用法?Java IndexMetaData.Custom怎么用?Java IndexMetaData.Custom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.cluster.metadata.IndexMetaData的用法示例。


在下文中一共展示了IndexMetaData.Custom方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mergeWith

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
@Override
public IndexMetaData.Custom mergeWith(IndexMetaData.Custom other) {
    IndexWarmersMetaData second = (IndexWarmersMetaData) other;
    List<Entry> entries = new ArrayList<>();
    entries.addAll(entries());
    for (Entry secondEntry : second.entries()) {
        boolean found = false;
        for (Entry firstEntry : entries()) {
            if (firstEntry.name().equals(secondEntry.name())) {
                found = true;
                break;
            }
        }
        if (!found) {
            entries.add(secondEntry);
        }
    }
    return new IndexWarmersMetaData(entries.toArray(new Entry[entries.size()]));
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:20,代码来源:IndexWarmersMetaData.java

示例2: readFrom

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    cause = in.readString();
    index = in.readString();
    settings = readSettingsFromStream(in);
    readTimeout(in);
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        mappings.put(in.readString(), in.readString());
    }
    int customSize = in.readVInt();
    for (int i = 0; i < customSize; i++) {
        String type = in.readString();
        IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupPrototypeSafe(type).readFrom(in);
        customs.put(type, customIndexMetaData);
    }
    int aliasesSize = in.readVInt();
    for (int i = 0; i < aliasesSize; i++) {
        aliases.add(Alias.read(in));
    }
    updateAllTypes = in.readBoolean();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:24,代码来源:CreateIndexRequest.java

示例3: readFrom

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    cause = in.readString();
    name = in.readString();
    template = in.readString();
    order = in.readInt();
    create = in.readBoolean();
    settings = readSettingsFromStream(in);
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        mappings.put(in.readString(), in.readString());
    }
    int customSize = in.readVInt();
    for (int i = 0; i < customSize; i++) {
        String type = in.readString();
        IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupPrototypeSafe(type).readFrom(in);
        customs.put(type, customIndexMetaData);
    }
    int aliasesSize = in.readVInt();
    for (int i = 0; i < aliasesSize; i++) {
        aliases.add(Alias.read(in));
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:25,代码来源:PutIndexTemplateRequest.java

示例4: customs

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
public Map<String, IndexMetaData.Custom> customs() {
    return this.customs;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:4,代码来源:CreateIndexRequest.java

示例5: addCustom

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
/**
 * Adds custom metadata to the index to be created.
 */
public CreateIndexRequestBuilder addCustom(IndexMetaData.Custom custom) {
    request.custom(custom);
    return this;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:CreateIndexRequestBuilder.java

示例6: customs

import org.elasticsearch.cluster.metadata.IndexMetaData; //导入方法依赖的package包/类
public Map<String, IndexMetaData.Custom> customs() {
    return customs;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:4,代码来源:CreateIndexClusterStateUpdateRequest.java


注:本文中的org.elasticsearch.cluster.metadata.IndexMetaData.Custom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。