@Override
  public boolean isSendComplete() {
    if (byteBufferToSend != null) {
      return !byteBufferToSend.hasRemaining();
    }
    return (bufferToSend != null && bufferToSend.readableBytes() == 0);
  }
Request Response for serialization and de-serialization
ambry-protocol/src/main/java/com/github/ambry/protocol/RequestOrResponse.java