本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readVInt方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readVInt方法的具体用法?Java StreamInput.readVInt怎么用?Java StreamInput.readVInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readVInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
ImmutableOpenMap.Builder<String, List<IndexWarmersMetaData.Entry>> indexMapBuilder = ImmutableOpenMap.builder();
for (int i = 0; i < size; i++) {
String key = in.readString();
int valueSize = in.readVInt();
List<IndexWarmersMetaData.Entry> warmerEntryBuilder = new ArrayList<>();
for (int j = 0; j < valueSize; j++) {
String name = in.readString();
String[] types = in.readStringArray();
BytesReference source = in.readBytesReference();
Boolean queryCache = null;
queryCache = in.readOptionalBoolean();
warmerEntryBuilder.add(new IndexWarmersMetaData.Entry(
name,
types,
queryCache,
source)
);
}
indexMapBuilder.put(key, Collections.unmodifiableList(warmerEntryBuilder));
}
warmers = indexMapBuilder.build();
}
示例2: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
final int size = in.readVInt();
indicesMergedFieldStats = new HashMap<>(size);
for (int i = 0; i < size; i++) {
String key = in.readString();
int indexSize = in.readVInt();
Map<String, FieldStats> indexFieldStats = new HashMap<>(indexSize);
indicesMergedFieldStats.put(key, indexFieldStats);
for (int j = 0; j < indexSize; j++) {
key = in.readString();
FieldStats value = FieldStats.read(in);
indexFieldStats.put(key, value);
}
}
}
示例3: MoreLikeThisQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MoreLikeThisQueryBuilder(StreamInput in) throws IOException {
super(in);
fields = in.readOptionalStringArray();
likeTexts = in.readStringArray();
likeItems = in.readList(Item::new).toArray(new Item[0]);
unlikeTexts = in.readStringArray();
unlikeItems = in.readList(Item::new).toArray(new Item[0]);
maxQueryTerms = in.readVInt();
minTermFreq = in.readVInt();
minDocFreq = in.readVInt();
maxDocFreq = in.readVInt();
minWordLength = in.readVInt();
maxWordLength = in.readVInt();
stopWords = in.readOptionalStringArray();
analyzer = in.readOptionalString();
minimumShouldMatch = in.readString();
boostTerms = (Float) in.readGenericValue();
include = in.readBoolean();
failOnUnsupportedField = in.readBoolean();
}
示例4: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
routing = in.readOptionalString();
jobId = new UUID(in.readLong(), in.readLong());
int size = in.readVInt();
locations = new IntArrayList(size);
for (int i = 0; i < size; i++) {
locations.add(in.readVInt());
}
}
示例5: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
int nStatus = in.readVInt();
statuses = EnumSet.noneOf(ClusterHealthStatus.class);
for (int i = 0; i < nStatus; i++) {
statuses.add(ClusterHealthStatus.fromValue(in.readByte()));
}
indicesOptions = IndicesOptions.readIndicesOptions(in);
}
示例6: readBlockSet
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
private static ImmutableSet<ClusterBlock> readBlockSet(StreamInput in) throws IOException {
ImmutableSet.Builder<ClusterBlock> builder = ImmutableSet.builder();
int size = in.readVInt();
for (int i = 0; i < size; i++) {
builder.add(ClusterBlock.readClusterBlock(in));
}
return builder.build();
}
示例7: readSettingsFromStream
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public static Settings readSettingsFromStream(StreamInput in) throws IOException {
Builder builder = new Builder();
int numberOfSettings = in.readVInt();
for (int i = 0; i < numberOfSettings; i++) {
builder.put(in.readString(), in.readString());
}
return builder.build();
}
示例8: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
int size = in.readVInt();
infos = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
ThreadPool.Info info = new ThreadPool.Info();
info.readFrom(in);
infos.add(info);
}
}
示例9: MultiLineStringBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MultiLineStringBuilder(StreamInput in) throws IOException {
int size = in.readVInt();
for (int i = 0; i < size; i++) {
linestring(new LineStringBuilder(in));
}
}
示例10: MoveAllocationCommand
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MoveAllocationCommand(StreamInput in) throws IOException {
index = in.readString();
shardId = in.readVInt();
fromNode = in.readString();
toNode = in.readString();
}
示例11: readFieldDoc
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public static FieldDoc readFieldDoc(StreamInput in) throws IOException {
Comparable[] cFields = new Comparable[in.readVInt()];
for (int j = 0; j < cFields.length; j++) {
byte type = in.readByte();
if (type == 0) {
cFields[j] = null;
} else if (type == 1) {
cFields[j] = in.readString();
} else if (type == 2) {
cFields[j] = in.readInt();
} else if (type == 3) {
cFields[j] = in.readLong();
} else if (type == 4) {
cFields[j] = in.readFloat();
} else if (type == 5) {
cFields[j] = in.readDouble();
} else if (type == 6) {
cFields[j] = in.readByte();
} else if (type == 7) {
cFields[j] = in.readShort();
} else if (type == 8) {
cFields[j] = in.readBoolean();
} else if (type == 9) {
cFields[j] = in.readBytesRef();
} else {
throw new IOException("Can't match type [" + type + "]");
}
}
return new FieldDoc(in.readVInt(), in.readFloat(), cFields);
}
示例12: BucketScriptPipelineAggregationBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public BucketScriptPipelineAggregationBuilder(StreamInput in) throws IOException {
super(in, NAME);
int mapSize = in.readVInt();
bucketsPathsMap = new HashMap<String, String>(mapSize);
for (int i = 0; i < mapSize; i++) {
bucketsPathsMap.put(in.readString(), in.readString());
}
script = new Script(in);
format = in.readOptionalString();
gapPolicy = GapPolicy.readFrom(in);
}
示例13: SuggestBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public SuggestBuilder(StreamInput in) throws IOException {
globalText = in.readOptionalString();
final int size = in.readVInt();
for (int i = 0; i < size; i++) {
suggestions.put(in.readString(), in.readNamedWriteable(SuggestionBuilder.class));
}
}
示例14: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
name = in.readString();
int size = in.readVInt();
values = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
values.add(in.readGenericValue());
}
}
示例15: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
recoveryId = in.readLong();
shardId = ShardId.readShardId(in);
totalTranslogOps = in.readVInt();
}