當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。