@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); shardSearchLocalRequest.innerWriteTo(out, false); OriginalIndices.writeOriginalIndices(originalIndices, out); }
@Override public BytesReference cacheKey() throws IOException { BytesStreamOutput out = new BytesStreamOutput(); this.innerWriteTo(out, true); // copy it over, most requests are small, we might as well copy to make sure we are not sliced... // we could potentially keep it without copying, but then pay the price of extra unused bytes up to a page return new BytesArray(out.bytes().toBytesRef(), true);// do a deep copy }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); shardSearchLocalRequest.innerWriteTo(out, false); OriginalIndices.writeOriginalIndices(originalIndices, out); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); shardSearchLocalRequest.innerWriteTo(out, false); OriginalIndices.writeOriginalIndices(originalIndices, out); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); shardSearchLocalRequest.innerWriteTo(out, false); OriginalIndices.writeOriginalIndices(originalIndices, out); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); shardSearchLocalRequest.innerWriteTo(out, false); OriginalIndices.writeOriginalIndices(originalIndices, out); }
@Override public BytesReference cacheKey() throws IOException { BytesStreamOutput out = new BytesStreamOutput(); this.innerWriteTo(out, true); // copy it over, most requests are small, we might as well copy to make sure we are not sliced... // we could potentially keep it without copying, but then pay the price of extra unused bytes up to a page return out.bytes().copyBytesArray(); } }
@Override public BytesReference cacheKey() throws IOException { BytesStreamOutput out = new BytesStreamOutput(); this.innerWriteTo(out, true); // copy it over, most requests are small, we might as well copy to make sure we are not sliced... // we could potentially keep it without copying, but then pay the price of extra unused bytes up to a page return new BytesArray(out.bytes().toBytesRef(), true);// do a deep copy }
@Override public BytesReference cacheKey() throws IOException { BytesStreamOutput out = new BytesStreamOutput(); this.innerWriteTo(out, true); // copy it over, most requests are small, we might as well copy to make sure we are not sliced... // we could potentially keep it without copying, but then pay the price of extra unused bytes up to a page return new BytesArray(out.bytes().toBytesRef(), true);// do a deep copy }
@Override public BytesReference cacheKey() throws IOException { BytesStreamOutput out = new BytesStreamOutput(); this.innerWriteTo(out, true); // copy it over, most requests are small, we might as well copy to make sure we are not sliced... // we could potentially keep it without copying, but then pay the price of extra unused bytes up to a page return new BytesArray(out.bytes().toBytesRef(), true);// do a deep copy }