本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamOutput.writeBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java StreamOutput.writeBoolean方法的具体用法?Java StreamOutput.writeBoolean怎么用?Java StreamOutput.writeBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamOutput
的用法示例。
在下文中一共展示了StreamOutput.writeBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(timestamp);
if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
out.writeBoolean(cpuPercent != null);
if (cpuPercent != null) {
out.writeShort(cpuPercent);
}
}
out.writeDouble(loadAverage);
if (mem == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
mem.writeTo(out);
}
if (swap == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
swap.writeTo(out);
}
}
示例2: writeOrder
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
public static void writeOrder(Terms.Order order, StreamOutput out) throws IOException {
if (order instanceof Aggregation) {
out.writeByte(order.id());
Aggregation aggregationOrder = (Aggregation) order;
out.writeBoolean(((MultiBucketsAggregation.Bucket.SubAggregationComparator) aggregationOrder.comparator).asc());
AggregationPath path = ((Aggregation) order).path();
out.writeString(path.toString());
} else if (order instanceof CompoundOrder) {
CompoundOrder compoundOrder = (CompoundOrder) order;
out.writeByte(order.id());
out.writeVInt(compoundOrder.orderElements.size());
for (Terms.Order innerOrder : compoundOrder.orderElements) {
Streams.writeOrder(innerOrder, out);
}
} else {
out.writeByte(order.id());
}
}
示例3: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(id);
out.writeString(opType);
if (response == null) {
out.writeByte((byte) 2);
} else {
if (response instanceof IndexResponse) {
out.writeByte((byte) 0);
} else if (response instanceof DeleteResponse) {
out.writeByte((byte) 1);
} else if (response instanceof UpdateResponse) {
out.writeByte((byte) 3); // make 3 instead of 2, because 2 is already in use for 'no responses'
}
response.writeTo(out);
}
if (failure == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
failure.writeTo(out);
}
}
示例4: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeLong(jobId.getMostSignificantBits());
out.writeLong(jobId.getLeastSignificantBits());
out.writeVInt(executionPhaseId);
out.writeVInt(bucketIdx);
out.writeBoolean(isLast);
out.writeByte(inputId);
boolean failure = throwable != null;
out.writeBoolean(failure);
if (failure) {
out.writeThrowable(throwable);
} else {
// TODO: we should not rely on another bucket in this class and instead write to the stream directly
StreamBucket.writeBucket(out, streamers, rows);
}
}
示例5: doWriteTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(fieldName);
boolean hasShape = shape != null;
out.writeBoolean(hasShape);
if (hasShape) {
out.writeNamedWriteable(shape);
} else {
out.writeOptionalString(indexedShapeId);
out.writeOptionalString(indexedShapeType);
out.writeOptionalString(indexedShapeIndex);
out.writeOptionalString(indexedShapePath);
}
relation.writeTo(out);
out.writeOptionalWriteable(strategy);
out.writeBoolean(ignoreUnmapped);
}
示例6: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
node.writeTo(out);
out.writeLong(taskId.getId());
out.writeString(type);
out.writeString(action);
out.writeOptionalString(description);
if (status != null) {
out.writeBoolean(true);
out.writeTaskStatus(status);
} else {
out.writeBoolean(false);
}
out.writeLong(startTime);
out.writeLong(runningTimeNanos);
parentTaskId.writeTo(out);
}
示例7: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(requestName);
out.writeString(nodeId);
out.writeBoolean(shouldBlock);
}
示例8: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeShort(percent);
if (loadAverage == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
out.writeDoubleArray(loadAverage);
}
}
示例9: innerWriteTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void innerWriteTo(StreamOutput out) throws IOException {
out.writeVInt(ranges.size());
for (Range range : ranges) {
range.writeTo(out);
}
out.writeBoolean(keyed);
}
示例10: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeBoolean(routingTable);
out.writeBoolean(nodes);
out.writeBoolean(metaData);
out.writeBoolean(blocks);
out.writeBoolean(customs);
out.writeStringArray(indices);
indicesOptions.writeIndicesOptions(out);
}
示例11: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(index);
out.writeString(type);
out.writeString(id);
out.writeLong(version);
out.writeBoolean(created);
if (getResult == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
getResult.writeTo(out);
}
}
示例12: doWriteTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(queryText);
out.writeInt(fieldsAndWeights.size());
for (Map.Entry<String, Float> entry : fieldsAndWeights.entrySet()) {
out.writeString(entry.getKey());
out.writeFloat(entry.getValue());
}
out.writeInt(flags);
out.writeOptionalString(analyzer);
defaultOperator.writeTo(out);
if (out.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
out.writeBoolean(true); // lowercase_expanded_terms
}
out.writeBoolean(settings.lenient());
if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
out.writeBoolean(lenientSet);
}
out.writeBoolean(settings.analyzeWildcard());
if (out.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
out.writeString(Locale.ROOT.toLanguageTag()); // locale
}
out.writeOptionalString(minimumShouldMatch);
if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
out.writeOptionalString(settings.quoteFieldSuffix());
out.writeOptionalBoolean(useAllFields);
}
}
示例13: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
taskId.writeTo(out);
out.writeOptionalWriteable(timeout);
out.writeBoolean(waitForCompletion);
}
示例14: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(name);
out.writeString(description);
out.writeBoolean(site);
out.writeBoolean(jvm);
out.writeString(version);
out.writeString(classname);
out.writeBoolean(isolated);
}
示例15: writeTo
import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(indexCount);
out.writeVLong(indexTimeInMillis);
out.writeVLong(indexCurrent);
out.writeVLong(indexFailedCount);
out.writeVLong(deleteCount);
out.writeVLong(deleteTimeInMillis);
out.writeVLong(deleteCurrent);
out.writeVLong(noopUpdateCount);
out.writeBoolean(isThrottled);
out.writeLong(throttleTimeInMillis);
}