當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。