code: void acceptAsTargetSegment(MergeSegmentOperation operation, SegmentMetadataUpdateTransaction sourceMetadata) throws MetadataUpdateException {
          ensureSegmentId(operation);
  
          if (operation.getStreamSegmentOffset() != this.length) {
              throw new MetadataUpdateException(containerId,
                      String.format("MergeSegmentOperation target offset mismatch. Expected %d, actual %d.",
                              this.length, operation.getStreamSegmentOffset()));
          }
  
          long transLength = operation.getLength();
          if (transLength < 0 || transLength != sourceMetadata.length) {
              throw new MetadataUpdateException(containerId,
                      "MergeSegmentOperation does not seem to have been pre-processed: " + operation.toString());
          }
  
          this.length += transLength;
          this.isChanged = true;
      }
docs: Accepts the given MergeSegmentOperation as a Target Segment (where it will be merged into).
  
  @param operation      The operation to accept.
  @param sourceMetadata The metadata for the Source Segment to merge.
  @throws MetadataUpdateException  If the operation cannot be processed because of the current state of the metadata.
  @throws IllegalArgumentException If the operation is for a different Segment.