@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (valueCase_) { case 1: hash = (37 * hash) + COMMAND_FIELD_NUMBER; hash = (53 * hash) + getCommand().hashCode(); break; case 2: hash = (37 * hash) + CHUNK_FIELD_NUMBER; hash = (53 * hash) + getChunk().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.WriteRequest)) { return super.equals(obj); } alluxio.grpc.WriteRequest other = (alluxio.grpc.WriteRequest) obj; boolean result = true; result = result && getValueCase().equals( other.getValueCase()); if (!result) return false; switch (valueCase_) { case 1: result = result && getCommand() .equals(other.getCommand()); break; case 2: result = result && getChunk() .equals(other.getChunk()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(alluxio.grpc.WriteRequest other) { if (other == alluxio.grpc.WriteRequest.getDefaultInstance()) return this; switch (other.getValueCase()) { case COMMAND: { mergeCommand(other.getCommand()); break; } case CHUNK: { mergeChunk(other.getChunk()); break; } case VALUE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
validateWriteRequest(request, pos); if (request.hasChunk()) { Chunk chunk = request.getChunk(); Assert.assertTrue(chunk.hasData()); ByteString buf = chunk.getData();
Preconditions.checkState(writeRequest.hasChunk(), "write request is missing data chunk in non-command message"); ByteString data = writeRequest.getChunk().getData(); Preconditions.checkState(data != null && data.size() > 0, "invalid data size from write request message");
Chunk chunk = writeRequest.getChunk(); Assert.assertTrue(chunk.hasData()); ByteString buf = chunk.getData();