public void writeBytesRef(BytesRef bytes) throws IOException { if (bytes == null) { writeVInt(0); return; } writeVInt(bytes.length); write(bytes.bytes, bytes.offset, bytes.length); }
@Override public void writeByte(byte b) throws IOException { stream.write(b); }
@Override public void writeTo(StreamOutput out) throws IOException { if (out.getVersion().before(Version.V_6_0_0_alpha1)) { out.writeShort((short)1); // this maps to InetSocketTransportAddress in 5.x } byte[] bytes = address.getAddress().getAddress(); // 4 bytes (IPv4) or 16 bytes (IPv6) out.writeByte((byte) bytes.length); // 1 byte out.write(bytes, 0, bytes.length); if (out.getVersion().after(Version.V_5_0_2)) { out.writeString(address.getHostString()); } // don't serialize scope ids over the network!!!! // these only make sense with respect to the local machine, and will only formulate // the address incorrectly remotely. out.writeInt(address.getPort()); }
public void writeText(Text text) throws IOException { if (!text.hasBytes()) { final String string = text.string(); spare.copyChars(string); writeInt(spare.length()); write(spare.bytes(), 0, spare.length()); } else { BytesReference bytes = text.bytes(); writeInt(bytes.length()); bytes.writeTo(this); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); clusterName.writeTo(out); ClusterState.Builder.writeTo(clusterState, out); out.write(files.size()); for (File file : files) { out.writeString(file.getAbsolutePath()); } } }
@Override public void writeTo(StreamOutput out) throws IOException { byte[] bytes = address().getAddress().getAddress(); // 4 bytes (IPv4) or 16 bytes (IPv6) out.writeByte((byte) bytes.length); // 1 byte out.write(bytes, 0, bytes.length); // don't serialize scope ids over the network!!!! // these only make sense with respect to the local machine, and will only formulate // the address incorrectly remotely. out.writeInt(address.getPort()); }
public void writeIndicesOptions(StreamOutput out) throws IOException { EnumSet<Option> options = this.options; // never write this out to a pre7.0 version if (out.getVersion().before(Version.V_6_6_0) && options.contains(Option.IGNORE_THROTTLED)) { options = EnumSet.copyOf(options); options.remove(Option.IGNORE_THROTTLED); } if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeEnumSet(options); out.writeEnumSet(expandWildcards); } else { if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha2)) { out.write(IndicesOptions.toByte(this)); } else { // if we are talking to a node that doesn't support the newly added flag (ignoreAliases) // flip to 0 all the bits starting from the 7th out.write(IndicesOptions.toByte(this) & 0x3f); } } }
public void writeBytesRef(BytesRef bytes) throws IOException { if (bytes == null) { writeVInt(0); return; } writeVInt(bytes.length); write(bytes.bytes, bytes.offset, bytes.length); }
public void writeText(Text text) throws IOException { if (!text.hasBytes()) { final String string = text.string(); spare.copyChars(string); writeInt(spare.length()); write(spare.bytes(), 0, spare.length()); } else { BytesReference bytes = text.bytes(); writeInt(bytes.length()); bytes.writeTo(this); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.write(processors.size()); for (ProcessorInfo info : processors) { info.writeTo(out); } }
public void writeBytesRef(BytesRef bytes) throws IOException { if (bytes == null) { writeVInt(0); return; } writeVInt(bytes.length); write(bytes.bytes, bytes.offset, bytes.length); }
public void writeText(Text text) throws IOException { if (!text.hasBytes()) { final String string = text.string(); spare.copyChars(string); writeInt(spare.length()); write(spare.bytes(), 0, spare.length()); } else { BytesReference bytes = text.bytes(); writeInt(bytes.length()); bytes.writeTo(this); } }
@Override public void writeByte(byte b) throws IOException { stream.write(b); }
public void writeBytesRef(BytesRef bytes) throws IOException { if (bytes == null) { writeVInt(0); return; } writeVInt(bytes.length); write(bytes.bytes, bytes.offset, bytes.length); }
public void writeText(Text text) throws IOException { if (!text.hasBytes()) { final String string = text.string(); spare.copyChars(string); writeInt(spare.length()); write(spare.bytes(), 0, spare.length()); } else { BytesReference bytes = text.bytes(); writeInt(bytes.length()); bytes.writeTo(this); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.write(processors.size()); for (ProcessorInfo info : processors) { info.writeTo(out); } }
public void writeBytesRef(BytesRef bytes) throws IOException { if (bytes == null) { writeVInt(0); return; } writeVInt(bytes.length); write(bytes.bytes, bytes.offset, bytes.length); }
public void writeText(Text text) throws IOException { if (!text.hasBytes()) { final String string = text.string(); spare.copyChars(string); writeInt(spare.length()); write(spare.bytes(), 0, spare.length()); } else { BytesReference bytes = text.bytes(); writeInt(bytes.length()); bytes.writeTo(this); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.write(processors.size()); for (ProcessorInfo info : processors) { info.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.write(processors.size()); for (ProcessorInfo info : processors) { info.writeTo(out); } }