@Override
  public long sizeInBytes() {
    // header + blobId + sourceHostName + sourceHostPort
    long sizeInBytes = super.sizeInBytes() + blobId.sizeInBytes();
    sizeInBytes += SOURCE_HOST_NAME_SIZE_IN_BYTES + sourceHostName.length();
    sizeInBytes += SOURCE_HOST_PORT_SIZE_IN_BYTES;

    if (versionId == VERSION_2) {
      // operationType + operationTimeInMs + lifeVersion + expirationTimeInMs
      sizeInBytes += OPERATION_TYPE_SIZE_IN_BYTES;
      sizeInBytes += OPERATION_TIME_SIZE_IN_BYTES;
      sizeInBytes += LIFE_VERSION_SIZE_IN_BYTES;
      sizeInBytes += OPERATION_PARAMETER_SIZE_IN_BYTES;
    }
    return sizeInBytes;
  }
@return the size of the serialized ReplicateBlobRequest stream
ambry-protocol/src/main/java/com/github/ambry/protocol/ReplicateBlobRequest.java