code: public void writeDataMessage(WriteRequest request, DataBuffer buffer) {
      if (buffer == null) {
        write(request);
        return;
      }
      Preconditions.checkState(!request.hasCommand(),
          "write request command should not come with data buffer");
      Preconditions.checkState(buffer.readableBytes() > 0,
          "invalid data size from write request message");
      if (!tryAcquireSemaphore()) {
        return;
      }
      mSerializingExecutor.execute(() -> {
        try {
          writeData(buffer);
        } finally {
          mSemaphore.release();
        }
      });
    }
docs: Handles write request with data message.
  
  @param request the request from the client
  @param buffer the data associated with the request