当前位置: 首页>>代码示例>>Java>>正文


Java StreamInput.readInt方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:24,代码来源:ClusterHealthRequest.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:IndexShardStatsRequest.java

示例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;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:Translog.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:29,代码来源:IndicesShardStoresResponse.java

示例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();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:ThreadPoolStats.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:AlterTenantPropertyRequest.java

示例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();
  }
 
开发者ID:sing1ee,项目名称:lucene-custom-query,代码行数:9,代码来源:SeqSpanQueryBuilder.java

示例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();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:TermsAggregator.java

示例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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:AnalyzeResponse.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:ClusterHealthResponse.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:12,代码来源:UserMetadata.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:BoundTransportAddress.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:UnicastZenPing.java

示例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());
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:InternalSearchHit.java

示例15: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    value1 = in.readInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:AbstractSimpleTransportTestCase.java


注:本文中的org.elasticsearch.common.io.stream.StreamInput.readInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。