当前位置: 首页>>代码示例>>Java>>正文


Java StreamOutput.writeOptionalWriteable方法代码示例

本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamOutput.writeOptionalWriteable方法的典型用法代码示例。如果您正苦于以下问题:Java StreamOutput.writeOptionalWriteable方法的具体用法?Java StreamOutput.writeOptionalWriteable怎么用?Java StreamOutput.writeOptionalWriteable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.common.io.stream.StreamOutput的用法示例。


在下文中一共展示了StreamOutput.writeOptionalWriteable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected final void doWriteTo(StreamOutput out) throws IOException {
    if (serializeTargetValueType()) {
        out.writeOptionalWriteable(targetValueType);
    }
    out.writeOptionalString(field);
    boolean hasScript = script != null;
    out.writeBoolean(hasScript);
    if (hasScript) {
        script.writeTo(out);
    }
    boolean hasValueType = valueType != null;
    out.writeBoolean(hasValueType);
    if (hasValueType) {
        valueType.writeTo(out);
    }
    out.writeOptionalString(format);
    out.writeGenericValue(missing);
    boolean hasTimeZone = timeZone != null;
    out.writeBoolean(hasTimeZone);
    if (hasTimeZone) {
        out.writeString(timeZone.getID());
    }
    innerWriteTo(out);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:26,代码来源:ValuesSourceAggregationBuilder.java

示例2: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeString(type);
    out.writeString(id);
    out.writeOptionalString(routing);
    out.writeOptionalString(parent);
    out.writeOptionalString(preference);

    out.writeBoolean(refresh);
    out.writeOptionalStringArray(storedFields);
    out.writeBoolean(realtime);
    out.writeByte(versionType.getValue());
    out.writeLong(version);
    out.writeOptionalWriteable(fetchSourceContext);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:GetRequest.java

示例3: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeVLong(timestamp);
    if (indices == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        indices.writeTo(out);
    }
    out.writeOptionalWriteable(os);
    out.writeOptionalWriteable(process);
    out.writeOptionalWriteable(jvm);
    out.writeOptionalWriteable(threadPool);
    out.writeOptionalWriteable(fs);
    out.writeOptionalWriteable(transport);
    out.writeOptionalWriteable(http);
    out.writeOptionalWriteable(breaker);
    out.writeOptionalWriteable(scriptStats);
    out.writeOptionalWriteable(discoveryStats);
    out.writeOptionalWriteable(ingestStats);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:NodeStats.java

示例4: 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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:GeoShapeQueryBuilder.java

示例5: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    shardRouting.writeTo(out);
    out.writeOptionalWriteable(currentNode);
    out.writeOptionalWriteable(relocationTargetNode);
    out.writeOptionalWriteable(clusterInfo);
    shardAllocationDecision.writeTo(out);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:ClusterAllocationExplanation.java

示例6: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    timer.writeTo(out);
    out.writeByte(stage.id());
    shardId.writeTo(out);
    recoverySource.writeTo(out);
    targetNode.writeTo(out);
    out.writeOptionalWriteable(sourceNode);
    index.writeTo(out);
    translog.writeTo(out);
    verifyIndex.writeTo(out);
    out.writeBoolean(primary);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:RecoveryState.java

示例7: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVLong(timestamp);
    out.writeOptionalWriteable(ioStats);
    out.writeVInt(paths.length);
    for (Path path : paths) {
        path.writeTo(out);
    }
    if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
        out.writeOptionalWriteable(this.leastDiskEstimate);
        out.writeOptionalWriteable(this.mostDiskEstimate);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:FsInfo.java

示例8: writeToNoId

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
public void writeToNoId(StreamOutput out) throws IOException {
    out.writeVInt(from);
    out.writeVInt(size);
    if (sortValueFormats == null) {
        out.writeVInt(0);
    } else {
        out.writeVInt(1 + sortValueFormats.length);
        for (int i = 0; i < sortValueFormats.length; ++i) {
            out.writeNamedWriteable(sortValueFormats[i]);
        }
    }
    writeTopDocs(out, topDocs);
    if (aggregations == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        aggregations.writeTo(out);
    }
    out.writeNamedWriteableList(pipelineAggregators == null ? emptyList() : pipelineAggregators);
    if (suggest == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        suggest.writeTo(out);
    }
    out.writeBoolean(searchTimedOut);
    out.writeOptionalBoolean(terminatedEarly);
    out.writeOptionalWriteable(profileShardResults);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:30,代码来源:QuerySearchResult.java

示例9: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeString(path);
    out.writeVInt(scoreMode.ordinal());
    out.writeNamedWriteable(query);
    out.writeOptionalWriteable(innerHitBuilder);
    out.writeBoolean(ignoreUnmapped);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:NestedQueryBuilder.java

示例10: 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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:GetTaskRequest.java

示例11: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeString(type.getType());
    out.writeInt(min);
    out.writeInt(max);
    out.writeOptionalWriteable(keepAlive);
    out.writeOptionalWriteable(queueSize);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:ThreadPool.java

示例12: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(fieldName);
    out.writeOptionalNamedWriteable(nestedFilter);
    out.writeOptionalString(nestedPath);
    out.writeGenericValue(missing);
    out.writeOptionalWriteable(order);
    out.writeOptionalWriteable(sortMode);
    out.writeOptionalString(unmappedType);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:FieldSortBuilder.java

示例13: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    clusterName.writeTo(out);
    out.writeOptionalWriteable(node);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:LivenessResponse.java

示例14: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeString(fieldName);
    out.writeOptionalWriteable(termsLookup);
    out.writeGenericValue(values);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:TermsQueryBuilder.java

示例15: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeFloat(score);
    out.writeOptionalText(id);
    out.writeOptionalText(type);
    out.writeOptionalWriteable(nestedIdentity);
    out.writeLong(version);
    out.writeBytesReference(source);
    if (explanation == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        writeExplanation(out, explanation);
    }
    if (fields == null) {
        out.writeVInt(0);
    } else {
        out.writeVInt(fields.size());
        for (SearchHitField hitField : getFields().values()) {
            hitField.writeTo(out);
        }
    }
    if (highlightFields == null) {
        out.writeVInt(0);
    } else {
        out.writeVInt(highlightFields.size());
        for (HighlightField highlightField : highlightFields.values()) {
            highlightField.writeTo(out);
        }
    }
    sortValues.writeTo(out);

    if (matchedQueries.length == 0) {
        out.writeVInt(0);
    } else {
        out.writeVInt(matchedQueries.length);
        for (String matchedFilter : matchedQueries) {
            out.writeString(matchedFilter);
        }
    }
    out.writeOptionalWriteable(shard);
    if (innerHits == null) {
        out.writeVInt(0);
    } else {
        out.writeVInt(innerHits.size());
        for (Map.Entry<String, SearchHits> entry : innerHits.entrySet()) {
            out.writeString(entry.getKey());
            entry.getValue().writeTo(out);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:52,代码来源:SearchHit.java


注:本文中的org.elasticsearch.common.io.stream.StreamOutput.writeOptionalWriteable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。