當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamInput.readVLong方法代碼示例

本文整理匯總了Java中org.elasticsearch.common.io.stream.StreamInput.readVLong方法的典型用法代碼示例。如果您正苦於以下問題:Java StreamInput.readVLong方法的具體用法?Java StreamInput.readVLong怎麽用?Java StreamInput.readVLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.elasticsearch.common.io.stream.StreamInput的用法示例。


在下文中一共展示了StreamInput.readVLong方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public void readFrom(StreamInput in, StreamContext context) throws IOException {
    totalHits = in.readVLong();
    maxScore = in.readFloat();
    int size = in.readVInt();
    if (size == 0) {
        hits = EMPTY;
    } else {
        if (context.streamShardTarget() == StreamContext.ShardTargetType.LOOKUP) {
            // read the lookup table first
            int lookupSize = in.readVInt();
            for (int i = 0; i < lookupSize; i++) {
                context.handleShardLookup().put(in.readVInt(), readSearchShardTarget(in));
            }
        }

        hits = new InternalSearchHit[size];
        for (int i = 0; i < hits.length; i++) {
            hits[i] = readSearchHit(in, context);
        }
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:22,代碼來源:InternalSearchHits.java

示例2: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    timestamp = in.readVLong();
    if (in.readBoolean()) {
        indices = NodeIndicesStats.readIndicesStats(in);
    }
    os = in.readOptionalWriteable(OsStats::new);
    process = in.readOptionalWriteable(ProcessStats::new);
    jvm = in.readOptionalWriteable(JvmStats::new);
    threadPool = in.readOptionalWriteable(ThreadPoolStats::new);
    fs = in.readOptionalWriteable(FsInfo::new);
    transport = in.readOptionalWriteable(TransportStats::new);
    http = in.readOptionalWriteable(HttpStats::new);
    breaker = in.readOptionalWriteable(AllCircuitBreakerStats::new);
    scriptStats = in.readOptionalWriteable(ScriptStats::new);
    discoveryStats = in.readOptionalWriteable(DiscoveryStats::new);
    ingestStats = in.readOptionalWriteable(IngestStats::new);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:20,代碼來源:NodeStats.java

示例3: innerReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
protected void innerReadFrom(StreamInput in) throws IOException {
    index = in.readString();
    shardId = in.readVInt();
    searchType = SearchType.fromId(in.readByte());
    numberOfShards = in.readVInt();
    if (in.readBoolean()) {
        scroll = readScroll(in);
    }

    source = in.readBytesReference();
    extraSource = in.readBytesReference();

    types = in.readStringArray();
    filteringAliases = in.readStringArray();
    nowInMillis = in.readVLong();

    templateSource = in.readBytesReference();
    if (in.readBoolean()) {
        template = Template.readTemplate(in);
    }
    requestCache = in.readOptionalBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:24,代碼來源:ShardSearchLocalRequest.java

示例4: doReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
protected void doReadFrom(StreamInput in) throws IOException {
    this.formatter = ValueFormatterStreams.readOptional(in);
    this.requiredSize = readSize(in);
    this.minDocCount = in.readVLong();
    this.subsetSize = in.readVLong();
    this.supersetSize = in.readVLong();
    significanceHeuristic = SignificanceHeuristicStreams.read(in);

    int size = in.readVInt();
    List<InternalSignificantTerms.Bucket> buckets = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        Bucket bucket = new Bucket(subsetSize, supersetSize, formatter);
        bucket.readFrom(in);
        buckets.add(bucket);

    }
    this.buckets = buckets;
    this.bucketMap = null;
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:21,代碼來源:SignificantLongTerms.java

示例5: doReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
protected void doReadFrom(StreamInput in) throws IOException {
    this.docCountError = in.readLong();
    this.order = InternalOrder.Streams.readOrder(in);
    this.formatter = ValueFormatterStreams.readOptional(in);
    this.requiredSize = readSize(in);
    this.shardSize = readSize(in);
    this.showTermDocCountError = in.readBoolean();
    this.minDocCount = in.readVLong();
    this.otherDocCount = in.readVLong();
    int size = in.readVInt();
    List<InternalTerms.Bucket> buckets = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        Bucket bucket = new Bucket(formatter, showTermDocCountError);
        bucket.readFrom(in);
        buckets.add(bucket);
    }
    this.buckets = buckets;
    this.bucketMap = null;
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:21,代碼來源:LongTerms.java

示例6: MemoryPool

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public MemoryPool(StreamInput in) throws IOException {
    name = in.readString();
    used = in.readVLong();
    max = in.readVLong();
    peakUsed = in.readVLong();
    peakMax = in.readVLong();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:8,代碼來源:JvmStats.java

示例7: readRamTree

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
Accountable readRamTree(StreamInput in) throws IOException {
    final String name = in.readString();
    final long bytes = in.readVLong();
    int numChildren = in.readVInt();
    if (numChildren == 0) {
        return Accountables.namedAccountable(name, bytes);
    }
    List<Accountable> children = new ArrayList(numChildren);
    while (numChildren-- > 0) {
        children.add(readRamTree(in));
    }
    return Accountables.namedAccountable(name, children, bytes);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:14,代碼來源:Segment.java

示例8: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    existsCount = in.readVLong();
    existsTimeInMillis = in.readVLong();
    missingCount = in.readVLong();
    missingTimeInMillis = in.readVLong();
    current = in.readVLong();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:9,代碼來源:GetStats.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    memorySize = in.readVLong();
    evictions = in.readVLong();
    if (in.readBoolean()) {
        int size = in.readVInt();
        fields = new ObjectLongHashMap<>(size);
        for (int i = 0; i < size; i++) {
            fields.put(in.readString(), in.readVLong());
        }
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:13,代碼來源:FieldDataStats.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    timestamp = in.readVLong();
    status = null;
    if (in.readBoolean()) {
        // it may be that the master switched on us while doing the operation. In this case the status may be null.
        status = ClusterHealthStatus.fromValue(in.readByte());
    }
    clusterUUID = in.readString();
    nodesStats = ClusterStatsNodes.readNodeStats(in);
    indicesStats = ClusterStatsIndices.readIndicesStats(in);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:14,代碼來源:ClusterStatsResponse.java

示例11: InternalDateHistogram

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Stream from a stream.
 */
public InternalDateHistogram(StreamInput in) throws IOException {
    super(in);
    order = InternalOrder.Streams.readOrder(in);
    minDocCount = in.readVLong();
    if (minDocCount == 0) {
        emptyBucketInfo = new EmptyBucketInfo(in);
    } else {
        emptyBucketInfo = null;
    }
    offset = in.readLong();
    format = in.readNamedWriteable(DocValueFormat.class);
    keyed = in.readBoolean();
    buckets = in.readList(stream -> new Bucket(stream, keyed, format));
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:18,代碼來源:InternalDateHistogram.java

示例12: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    timestamp = in.readVLong();
    openFileDescriptors = in.readLong();
    maxFileDescriptors = in.readLong();
    if (in.readBoolean()) {
        cpu = Cpu.readCpu(in);
    }
    if (in.readBoolean()) {
        mem = Mem.readMem(in);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:13,代碼來源:ProcessStats.java

示例13: InternalMappedTerms

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
protected InternalMappedTerms(StreamInput in, Bucket.Reader<B> bucketReader) throws IOException {
    super(in);
    docCountError = in.readZLong();
    format = in.readNamedWriteable(DocValueFormat.class);
    shardSize = readSize(in);
    showTermDocCountError = in.readBoolean();
    otherDocCount = in.readVLong();
    buckets = in.readList(stream -> bucketReader.read(stream, format, showTermDocCountError));
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:InternalMappedTerms.java

示例14: readValueFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public AverageState readValueFrom(StreamInput in) throws IOException {
    AverageState averageState = new AverageState();
    averageState.sum = in.readDouble();
    averageState.count = in.readVLong();
    return averageState;
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:8,代碼來源:AverageAggregation.java

示例15: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    numberOfOperations = in.readVInt();
    translogSizeInBytes = in.readVLong();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:6,代碼來源:TranslogStats.java


注:本文中的org.elasticsearch.common.io.stream.StreamInput.readVLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。