當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。