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


Java StreamOutput.writeOptionalStreamable方法代码示例

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


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

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalStreamable(docs);
    out.writeOptionalStreamable(store);
    out.writeOptionalStreamable(indexing);
    out.writeOptionalStreamable(get);
    out.writeOptionalStreamable(search);
    out.writeOptionalStreamable(merge);
    out.writeOptionalStreamable(refresh);
    out.writeOptionalStreamable(flush);
    out.writeOptionalStreamable(warmer);
    out.writeOptionalStreamable(queryCache);
    out.writeOptionalStreamable(fieldData);
    out.writeOptionalStreamable(completion);
    out.writeOptionalStreamable(segments);
    out.writeOptionalStreamable(translog);
    out.writeOptionalStreamable(requestCache);
    out.writeOptionalStreamable(recoveryStats);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:CommonStats.java

示例2: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeString(nodeId);
    out.writeVInt(totalShards);
    out.writeVInt(results.size());
    for (ShardOperationResult result : results) {
        out.writeOptionalStreamable(result);
    }
    out.writeBoolean(exceptions != null);
    if (exceptions != null) {
        int failureShards = exceptions.size();
        out.writeVInt(failureShards);
        for (int i = 0; i < failureShards; i++) {
            exceptions.get(i).writeTo(out);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:TransportBroadcastByNodeAction.java

示例3: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVInt(id);
    if (out.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) { // TODO remove once backported
        // old nodes expect updated version and version type on the request
        if (primaryResponse != null) {
            request.version(primaryResponse.getVersion());
            request.versionType(request.versionType().versionTypeForReplicationAndRecovery());
            DocWriteRequest.writeDocumentRequest(out, request);
        } else {
            DocWriteRequest.writeDocumentRequest(out, request);
        }
    } else {
        DocWriteRequest.writeDocumentRequest(out, request);
    }
    out.writeOptionalStreamable(primaryResponse);
    if (out.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) { // TODO remove once backported
        if (primaryResponse != null) {
            out.writeBoolean(primaryResponse.isFailed()
                    || primaryResponse.getResponse().getResult() == DocWriteResponse.Result.NOOP);
        } else {
            out.writeBoolean(false);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:26,代码来源:BulkItemRequest.java

示例4: writeTo

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

示例5: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeOptionalStreamable(request);
    out.writeBoolean(simulate);
    out.writeBoolean(explain);
    out.writeBoolean(profile);
    scriptType.writeTo(out);
    out.writeOptionalString(script);
    boolean hasParams = scriptParams != null;
    out.writeBoolean(hasParams);
    if (hasParams) {
        out.writeMap(scriptParams);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:SearchTemplateRequest.java

示例6: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (tokens != null) {
        out.writeVInt(tokens.size());
        for (AnalyzeToken token : tokens) {
            token.writeTo(out);
        }
    } else {
        out.writeVInt(0);
    }
    if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
        out.writeOptionalStreamable(detail);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:AnalyzeResponse.java

示例7: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    shardRouting.writeTo(out);
    commonStats.writeTo(out);
    out.writeOptionalStreamable(commitStats);
    out.writeString(statePath);
    out.writeString(dataPath);
    out.writeBoolean(isCustomDataPath);
    if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
        out.writeOptionalWriteable(seqNoStats);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:ShardStats.java

示例8: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeVLong(tookInMillis);
    out.writeVLong(count);
    if (matches == null) {
        out.writeVInt(-1);
    } else {
        out.writeVInt(matches.length);
        for (Match match : matches) {
            match.writeTo(out);
        }
    }
    out.writeOptionalStreamable(aggregations);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:16,代码来源:PercolateResponse.java

示例9: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeString(index);
    out.writeOptionalStreamable(shardId);
    timeout.writeTo(out);
    out.writeOptionalString(concreteIndex);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:InstanceShardOperationRequest.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);
    parentTaskId.writeTo(out);
    out.writeStringArrayNullable(nodesIds);
    out.writeStringArrayNullable(actions);
    out.writeOptionalStreamable(timeout);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:BaseTasksRequest.java

示例11: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(percolatorTypeId);
    out.writeVLong(requestedSize);
    out.writeVLong(count);
    out.writeVInt(matches.length);
    for (BytesRef match : matches) {
        out.writeBytesRef(match);
    }
    out.writeVLong(scores.length);
    for (float score : scores) {
        out.writeFloat(score);
    }
    out.writeVInt(hls.size());
    for (Map<String, HighlightField> hl : hls) {
        out.writeVInt(hl.size());
        for (Map.Entry<String, HighlightField> entry : hl.entrySet()) {
            out.writeString(entry.getKey());
            entry.getValue().writeTo(out);
        }
    }
    out.writeOptionalStreamable(aggregations);
    if (pipelineAggregators == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        out.writeVInt(pipelineAggregators.size());
        for (PipelineAggregator pipelineAggregator : pipelineAggregators) {
            out.writeBytesReference(pipelineAggregator.type().stream());
            pipelineAggregator.writeTo(out);
        }
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:35,代码来源:PercolateShardResponse.java

示例12: 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);
    }
    if (os == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        os.writeTo(out);
    }
    if (process == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        process.writeTo(out);
    }
    if (jvm == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        jvm.writeTo(out);
    }
    if (threadPool == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        threadPool.writeTo(out);
    }
    if (fs == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        fs.writeTo(out);
    }
    if (transport == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        transport.writeTo(out);
    }
    if (http == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        http.writeTo(out);
    }
    out.writeOptionalStreamable(breaker);
    out.writeOptionalStreamable(scriptStats);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:56,代码来源:NodeStats.java

示例13: writeTo

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

示例14: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeOptionalStreamable(shardTarget);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:6,代码来源:SearchException.java

示例15: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeOptionalText(field);
    out.writeInt(offset);
    out.writeOptionalStreamable(child);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:InternalSearchHit.java


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