@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); took.writeTo(out); status.writeTo(out); out.writeVInt(indexingFailures.size()); for (Failure failure: indexingFailures) { failure.writeTo(out); } out.writeVInt(searchFailures.size()); for (ShardSearchFailure failure: searchFailures) { failure.writeTo(out); } out.writeBoolean(timedOut); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); took.writeTo(out); status.writeTo(out); out.writeVInt(indexingFailures.size()); for (Failure failure: indexingFailures) { failure.writeTo(out); } out.writeVInt(searchFailures.size()); for (ShardSearchFailure failure: searchFailures) { failure.writeTo(out); } out.writeBoolean(timedOut); }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(id); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeByte(opType.getId()); } else { out.writeString(opType.getLowercase()); } if (response == null) { out.writeByte((byte) 2); } else { if (response instanceof IndexResponse) { out.writeByte((byte) 0); } else if (response instanceof DeleteResponse) { out.writeByte((byte) 1); } else if (response instanceof UpdateResponse) { out.writeByte((byte) 3); // make 3 instead of 2, because 2 is already in use for 'no responses' } response.writeTo(out); } if (failure == null) { out.writeBoolean(false); } else { out.writeBoolean(true); failure.writeTo(out); } } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(id); out.writeString(opType); if (response == null) { out.writeByte((byte) 2); } else { if (response instanceof IndexResponse) { out.writeByte((byte) 0); } else if (response instanceof DeleteResponse) { out.writeByte((byte) 1); } else if (response instanceof UpdateResponse) { out.writeByte((byte) 3); // make 3 instead of 2, because 2 is already in use for 'no responses' } response.writeTo(out); } if (failure == null) { out.writeBoolean(false); } else { out.writeBoolean(true); failure.writeTo(out); } } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(id); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeByte(opType.getId()); } else { out.writeString(opType.getLowercase()); } if (response == null) { out.writeByte((byte) 2); } else { if (response instanceof IndexResponse) { out.writeByte((byte) 0); } else if (response instanceof DeleteResponse) { out.writeByte((byte) 1); } else if (response instanceof UpdateResponse) { out.writeByte((byte) 3); // make 3 instead of 2, because 2 is already in use for 'no responses' } response.writeTo(out); } if (failure == null) { out.writeBoolean(false); } else { out.writeBoolean(true); failure.writeTo(out); } } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(id); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { out.writeByte(opType.getId()); } else { out.writeString(opType.getLowercase()); } if (response == null) { out.writeByte((byte) 2); } else { if (response instanceof IndexResponse) { out.writeByte((byte) 0); } else if (response instanceof DeleteResponse) { out.writeByte((byte) 1); } else if (response instanceof UpdateResponse) { out.writeByte((byte) 3); // make 3 instead of 2, because 2 is already in use for 'no responses' } response.writeTo(out); } if (failure == null) { out.writeBoolean(false); } else { out.writeBoolean(true); failure.writeTo(out); } } }