本文整理汇总了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();
}
示例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();
}
示例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 + "]");
}
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}