@Override
  protected void prepareBuffer() {
    super.prepareBuffer();
    bufferToSend.writeInt(replicaMetadataRequestInfoList.size());
    for (ReplicaMetadataRequestInfo replicaMetadataRequestInfo : replicaMetadataRequestInfoList) {
      replicaMetadataRequestInfo.writeTo(bufferToSend);
    }
    bufferToSend.writeLong(maxTotalSizeOfEntriesInBytes);
  }
Replica metadata request to get new entries for replication
ambry-protocol/src/main/java/com/github/ambry/protocol/ReplicaMetadataRequest.java