当前位置: 首页>>代码示例>>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;未经允许,请勿转载。