code: private void processNewOperation(StorageOperation operation) {
          if (operation instanceof MergeSegmentOperation) {
              this.operations.add(operation);
              this.mergeTransactionCount.incrementAndGet();
          } else if (operation instanceof StreamSegmentSealOperation) {
              this.operations.add(operation);
              this.hasSealPending.set(true);
          } else if (operation instanceof StreamSegmentTruncateOperation) {
              this.operations.add(operation);
              this.truncateCount.incrementAndGet();
          } else if (operation instanceof CachedStreamSegmentAppendOperation) {
              // Aggregate the Append Operation.
              AggregatedAppendOperation aggregatedAppend = getOrCreateAggregatedAppend(
                      operation.getStreamSegmentOffset(), operation.getSequenceNumber());
              aggregateAppendOperation((CachedStreamSegmentAppendOperation) operation, aggregatedAppend);
          }
      }
docs: Processes an operation that would result in a change to the underlying Storage.
  
  @param operation The Operation to process.