本文整理匯總了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()]));
}
示例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();
}
示例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));
}
}
示例4: customs
import org.elasticsearch.cluster.metadata.IndexMetaData; //導入方法依賴的package包/類
public Map<String, IndexMetaData.Custom> customs() {
return this.customs;
}
示例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;
}
示例6: customs
import org.elasticsearch.cluster.metadata.IndexMetaData; //導入方法依賴的package包/類
public Map<String, IndexMetaData.Custom> customs() {
return customs;
}