@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeBytesReference(bytes); } }
@Override protected void doWriteTo(StreamOutput out) throws IOException { out.writeString(fieldName); out.writeBytesReference(functionBytes); multiValueMode.writeTo(out); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(mappings.size()); for (Map.Entry<String, Map<String, Map<String, FieldMappingMetaData>>> indexEntry : mappings.entrySet()) { out.writeString(indexEntry.getKey()); out.writeVInt(indexEntry.getValue().size()); for (Map.Entry<String, Map<String, FieldMappingMetaData>> typeEntry : indexEntry.getValue().entrySet()) { out.writeString(typeEntry.getKey()); out.writeVInt(typeEntry.getValue().size()); for (Map.Entry<String, FieldMappingMetaData> fieldEntry : typeEntry.getValue().entrySet()) { out.writeString(fieldEntry.getKey()); FieldMappingMetaData fieldMapping = fieldEntry.getValue(); out.writeString(fieldMapping.fullName()); out.writeBytesReference(fieldMapping.source); } } } }
@Override public void writeTo(StreamOutput streamOutput) throws IOException { super.writeTo(streamOutput); assert version != null; try (BytesStreamOutput messageStreamOutput = new BytesStreamOutput(4)) { Version.writeVersion(version, messageStreamOutput); BytesReference reference = messageStreamOutput.bytes(); streamOutput.writeBytesReference(reference); } } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeString(id); out.writeBytesReference(config); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(id); out.writeBytesReference(source); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeOptionalString(id); out.writeBoolean(verbose); out.writeBytesReference(source); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeString(index); out.writeString(type); out.writeString(id); out.writeVLong(docVersion); final boolean docExists = isExists(); out.writeBoolean(docExists); out.writeBoolean(artificial); out.writeVLong(tookInMillis); out.writeBoolean(hasTermVectors()); if (hasTermVectors()) { out.writeBytesReference(headerRef); out.writeBytesReference(termVectors); } }
/** * Writes a {@link StoredScriptSource} to a stream. Version 5.3+ will write * all of the lang, source, and options parameters. For versions prior to 5.3, * only the source parameter will be read in as a bytes reference. */ @Override public void writeTo(StreamOutput out) throws IOException { if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeString(lang); out.writeString(source); @SuppressWarnings("unchecked") Map<String, Object> options = (Map<String, Object>)(Map)this.options; out.writeMap(options); } else { out.writeBytesReference(new BytesArray(source)); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeString(scheme); out.writeString(host); out.writeVInt(port); out.writeBytesReference(query); out.writeOptionalString(username); out.writeOptionalString(password); out.writeVInt(headers.size()); for (Map.Entry<String, String> header : headers.entrySet()) { out.writeString(header.getKey()); out.writeString(header.getValue()); } if (out.getVersion().onOrAfter(Version.V_5_2_0)) { out.writeTimeValue(socketTimeout); out.writeTimeValue(connectTimeout); } if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeOptionalString(pathPrefix); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeString(index); out.writeOptionalString(type); out.writeString(id); if (out.getVersion().onOrAfter(Version.V_6_6_0)) { out.writeZLong(seqNo); out.writeVLong(primaryTerm); } out.writeLong(version); out.writeBoolean(exists); if (exists) { out.writeBytesReference(source); if (fields == null) { out.writeVInt(0); } else { out.writeVInt(fields.size()); for (DocumentField field : fields.values()) { field.writeTo(out); } } } }
out.writeOptionalWriteable(nestedIdentity); out.writeLong(version); out.writeBytesReference(source); if (explanation == null) { out.writeBoolean(false);
private void write(final StreamOutput out) throws IOException { out.writeVInt(SERIALIZATION_FORMAT); out.writeString(id); out.writeString(type); out.writeBytesReference(source); out.writeOptionalString(routing); out.writeOptionalString(parent); out.writeLong(version); out.writeByte(versionType.getValue()); out.writeLong(autoGeneratedIdTimestamp); out.writeLong(seqNo); out.writeLong(primaryTerm); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); if (out.getVersion().before(Version.V_6_0_0_alpha2)) { out.writeString(source == null ? "" : source.getLang()); } out.writeOptionalString(id); out.writeBytesReference(content); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType); } if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha2)) { out.writeOptionalString(context); source.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeLong(recoveryId); shardId.writeTo(out); out.writeString(metaData.name()); out.writeVLong(position); out.writeVLong(metaData.length()); out.writeString(metaData.checksum()); out.writeBytesReference(content); out.writeString(metaData.writtenBy().toString()); out.writeBoolean(lastChunk); out.writeVInt(totalTranslogOps); out.writeLong(sourceThrottleTimeInNanos); }
out.writeBytesReference(doc); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType);
out.writeOptionalWriteable(null); out.writeBytesReference(source); out.writeByte(opType.getId()); out.writeLong(version);
@Override protected void doWriteTo(StreamOutput out) throws IOException { out.writeString(fieldName); out.writeBytesReference(functionBytes); multiValueMode.writeTo(out); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(path); out.writeMap(args); out.writeBytesReference(source); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeOptionalString(id); out.writeBoolean(verbose); out.writeBytesReference(source); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeEnum(xContentType); } }