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


Java StreamInput.readDouble方法代碼示例

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


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

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    activePrimaryShards = in.readVInt();
    activeShards = in.readVInt();
    relocatingShards = in.readVInt();
    initializingShards = in.readVInt();
    unassignedShards = in.readVInt();
    numberOfNodes = in.readVInt();
    numberOfDataNodes = in.readVInt();
    status = ClusterHealthStatus.fromValue(in.readByte());
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        ClusterIndexHealth indexHealth = readClusterIndexHealth(in);
        indices.put(indexHealth.getIndex(), indexHealth);
    }
    size = in.readVInt();
    if (size == 0) {
        validationFailures = Collections.emptyList();
    } else {
        for (int i = 0; i < size; i++) {
            validationFailures.add(in.readString());
        }
    }
    activeShardsPercent = in.readDouble();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:26,代碼來源:ClusterStateHealth.java

示例2: doReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
protected void doReadFrom(StreamInput in) throws IOException {
    valueFormatter = ValueFormatterStreams.readOptional(in);
    keys = new double[in.readInt()];
    for (int i = 0; i < keys.length; ++i) {
        keys[i] = in.readDouble();
    }
    long minBarForHighestToLowestValueRatio = in.readLong();
    final int serializedLen = in.readVInt();
    byte[] bytes = new byte[serializedLen];
    in.readBytes(bytes, 0, serializedLen);
    ByteBuffer stateBuffer = ByteBuffer.wrap(bytes);
    try {
        state = DoubleHistogram.decodeFromCompressedByteBuffer(stateBuffer, minBarForHighestToLowestValueRatio);
    } catch (DataFormatException e) {
        throw new IOException("Failed to decode DoubleHistogram for aggregation [" + name + "]", e);
    }
    keyed = in.readBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:20,代碼來源:AbstractInternalHDRPercentiles.java

示例3: readSortValue

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
private static Comparable readSortValue(StreamInput in) throws IOException {
    byte type = in.readByte();
    if (type == 0) {
        return null;
    } else if (type == 1) {
        return in.readString();
    } else if (type == 2) {
        return in.readInt();
    } else if (type == 3) {
        return in.readLong();
    } else if (type == 4) {
        return in.readFloat();
    } else if (type == 5) {
        return in.readDouble();
    } else if (type == 6) {
        return in.readByte();
    } else if (type == 7) {
        return in.readShort();
    } else if (type == 8) {
        return in.readBoolean();
    } else if (type == 9) {
        return in.readBytesRef();
    } else {
        throw new IOException("Can't match type [" + type + "]");
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:27,代碼來源:Lucene.java

示例4: CircuitBreakerStats

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public CircuitBreakerStats(StreamInput in) throws IOException {
    limit = in.readLong();
    estimated = in.readLong();
    overhead = in.readDouble();
    this.trippedCount = in.readLong();
    this.name = in.readString();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:8,代碼來源:CircuitBreakerStats.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    term = in.readDouble();
    docCount = in.readVLong();
    docCountError = -1;
    if (showDocCountError) {
        docCountError = in.readLong();
    }
    aggregations = InternalAggregations.readAggregations(in);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:11,代碼來源:DoubleTerms.java

示例6: InternalAvg

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public InternalAvg(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    sum = in.readDouble();
    count = in.readVLong();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:10,代碼來源:InternalAvg.java

示例7: GeoDistanceQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public GeoDistanceQueryBuilder(StreamInput in) throws IOException {
    super(in);
    fieldName = in.readString();
    distance = in.readDouble();
    validationMethod = GeoValidationMethod.readFromStream(in);
    center = in.readGeoPoint();
    geoDistance = GeoDistance.readFromStream(in);
    ignoreUnmapped = in.readBoolean();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:GeoDistanceQueryBuilder.java

示例8: 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);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:31,代碼來源:Lucene.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    geoTree = in.readString();
    precision = in.readOptionalString();
    treeLevels = in.readBoolean() ? null : in.readVInt();
    distanceErrorPct = in.readBoolean() ? null : in.readDouble();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:9,代碼來源:GeoReferenceInfo.java

示例10: HistogramAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/** Read from a stream, for internal use only. */
public HistogramAggregationBuilder(StreamInput in) throws IOException {
    super(in, ValuesSourceType.NUMERIC, ValueType.DOUBLE);
    if (in.readBoolean()) {
        order = InternalOrder.Streams.readOrder(in);
    }
    keyed = in.readBoolean();
    minDocCount = in.readVLong();
    interval = in.readDouble();
    offset = in.readDouble();
    minBound = in.readDouble();
    maxBound = in.readDouble();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:14,代碼來源:HistogramAggregationBuilder.java

示例11: HoltWintersModel

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public HoltWintersModel(StreamInput in) throws IOException {
    alpha = in.readDouble();
    beta = in.readDouble();
    gamma = in.readDouble();
    period = in.readVInt();
    seasonalityType = SeasonalityType.readFrom(in);
    pad = in.readBoolean();
    this.padding = inferPadding();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:HoltWintersModel.java

示例12: InternalBucketMetricValue

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public InternalBucketMetricValue(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    value = in.readDouble();
    keys = in.readStringArray();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:10,代碼來源:InternalBucketMetricValue.java

示例13: GeoDistanceAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public GeoDistanceAggregationBuilder(StreamInput in) throws IOException {
    super(in, InternalGeoDistance.FACTORY.getValueSourceType(), InternalGeoDistance.FACTORY.getValueType());
    origin = new GeoPoint(in.readDouble(), in.readDouble());
    int size = in.readVInt();
    ranges = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        ranges.add(new Range(in));
    }
    keyed = in.readBoolean();
    distanceType = GeoDistance.readFromStream(in);
    unit = DistanceUnit.readFromStream(in);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:16,代碼來源:GeoDistanceAggregationBuilder.java

示例14: doReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
protected void doReadFrom(StreamInput in) throws IOException {
    top = in.readDouble();
    bottom = in.readDouble();
    posLeft = in.readDouble();
    posRight = in.readDouble();
    negLeft = in.readDouble();
    negRight = in.readDouble();
    wrapLongitude = in.readBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:11,代碼來源:InternalGeoBounds.java

示例15: doReadFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
protected void doReadFrom(StreamInput in) throws IOException {
    valueFormatter = ValueFormatterStreams.readOptional(in);
    value = in.readDouble();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:6,代碼來源:InternalSimpleValue.java


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