本文整理汇总了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;
}