本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readInt方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readInt方法的具体用法?Java StreamInput.readInt怎么用?Java StreamInput.readInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readInt方法的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();
if (size == 0) {
indices = Strings.EMPTY_ARRAY;
} else {
indices = new String[size];
for (int i = 0; i < indices.length; i++) {
indices[i] = in.readString();
}
}
timeout = readTimeValue(in);
if (in.readBoolean()) {
waitForStatus = ClusterHealthStatus.fromValue(in.readByte());
}
waitForRelocatingShards = in.readInt();
waitForActiveShards = in.readInt();
waitForNodes = in.readString();
if (in.readBoolean()) {
waitForEvents = Priority.readFrom(in);
}
}
示例2: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
flags = CommonStatsFlags.readCommonStatsFlags(in);
indexName = in.readString();
shardId = in.readInt();
}
示例3: readOperations
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Reads a list of operations written with {@link #writeOperations(StreamOutput, List)}
*/
public static List<Operation> readOperations(StreamInput input) throws IOException {
ArrayList<Operation> operations = new ArrayList<>();
int numOps = input.readInt();
final BufferedChecksumStreamInput checksumStreamInput = new BufferedChecksumStreamInput(input);
for (int i = 0; i < numOps; i++) {
operations.add(readOperation(checksumStreamInput));
}
return operations;
}
示例4: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int numResponse = in.readVInt();
ImmutableOpenMap.Builder<String, ImmutableOpenIntMap<List<StoreStatus>>> storeStatusesBuilder = ImmutableOpenMap.builder();
for (int i = 0; i < numResponse; i++) {
String index = in.readString();
int indexEntries = in.readVInt();
ImmutableOpenIntMap.Builder<List<StoreStatus>> shardEntries = ImmutableOpenIntMap.builder();
for (int shardCount = 0; shardCount < indexEntries; shardCount++) {
int shardID = in.readInt();
int nodeEntries = in.readVInt();
List<StoreStatus> storeStatuses = new ArrayList<>(nodeEntries);
for (int nodeCount = 0; nodeCount < nodeEntries; nodeCount++) {
storeStatuses.add(readStoreStatus(in));
}
shardEntries.put(shardID, storeStatuses);
}
storeStatusesBuilder.put(index, shardEntries.build());
}
int numFailure = in.readVInt();
List<Failure> failureBuilder = new ArrayList<>();
for (int i = 0; i < numFailure; i++) {
failureBuilder.add(Failure.readFailure(in));
}
storeStatuses = storeStatusesBuilder.build();
failures = Collections.unmodifiableList(failureBuilder);
}
示例5: Stats
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public Stats(StreamInput in) throws IOException {
name = in.readString();
threads = in.readInt();
queue = in.readInt();
active = in.readInt();
rejected = in.readLong();
largest = in.readInt();
completed = in.readLong();
}
示例6: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
tenantName = in.readNullableString();
nodeNum = in.readInt();
password = in.readNullableString();
}
示例7: SeqSpanQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public SeqSpanQueryBuilder(StreamInput in) throws IOException {
fieldName = in.readString();
startTerm = in.readString();
seqTerm = in.readString();
endTerm = in.readString();
maxSpan = in.readInt();
}
示例8: BucketCountThresholds
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public BucketCountThresholds(StreamInput in) throws IOException {
requiredSize = in.readInt();
shardSize = in.readInt();
minDocCount = in.readLong();
shardMinDocCount = in.readLong();
}
示例9: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
term = in.readString();
startOffset = in.readInt();
endOffset = in.readInt();
position = in.readVInt();
type = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_2_2_0)) {
attributes = (Map<String, Object>) in.readGenericValue();
}
}
示例10: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
clusterName = in.readString();
clusterHealthStatus = ClusterHealthStatus.fromValue(in.readByte());
clusterStateHealth = new ClusterStateHealth(in);
numberOfPendingTasks = in.readInt();
timedOut = in.readBoolean();
numberOfInFlightFetch = in.readInt();
delayedUnassignedShards= in.readInt();
taskMaxWaitingTime = new TimeValue(in);
}
示例11: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public UserMetadata readFrom(StreamInput in) throws IOException {
Builder builder = new Builder();
int userNum = in.readInt();
for (int i = 0; i < userNum; ++i) {
String username = in.readString();
UserProperty userProperty = UserProperty.PROTO.readFrom(in);
builder.addOrChangeUserProperty(username, userProperty);
}
return builder.build();
}
示例12: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
int boundAddressLength = in.readInt();
boundAddresses = new TransportAddress[boundAddressLength];
for (int i = 0; i < boundAddressLength; i++) {
boundAddresses[i] = new TransportAddress(in);
}
publishAddress = new TransportAddress(in);
}
示例13: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
id = in.readInt();
timeout = readTimeValue(in);
pingResponse = readPingResponse(in);
}
示例14: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
field = in.readOptionalText();
offset = in.readInt();
child = in.readOptionalStreamable(new InternalNestedIdentity());
}
示例15: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
value1 = in.readInt();
}