@Override
  public void writeTo(AsyncWritableChannel channel, Callback<Long> callback) {
    int lastIndex = compositeSendList.size() - 1;
    int i = 0;
    // This callback technically won't be set to the correct value since it will only reflect the size of the last send,
    // not all sends in the batch. This may not currently be a problem but is something to look out for.
    for (Send send : compositeSendList) {
      if (i == lastIndex) {
        // only the last one pass in callback
        send.writeTo(channel, callback);
      } else {
        //TODO: stop writing to the channel whenever there is an exception here and stop the for loop.
        send.writeTo(channel, null);
      }
      i++;
    }
  }
Holds multiple Send instances and sends them over the network
ambry-protocol/src/main/java/com/github/ambry/protocol/CompositeSend.java