code: private void handleDataFrameComplete(DataFrame dataFrame) {
          Exceptions.checkArgument(dataFrame.isSealed(), "dataFrame", "Cannot publish a non-sealed DataFrame.");
  
          // Write DataFrame to DataFrameLog.
          CommitArgs commitArgs = new CommitArgs(this.lastSerializedSequenceNumber, this.lastStartedSequenceNumber, dataFrame.getLength());
  
          try {
              this.args.beforeCommit.accept(commitArgs);
              this.targetLog.append(dataFrame.getData(), this.args.writeTimeout)
                      .thenAcceptAsync(logAddress -> {
                          commitArgs.setLogAddress(logAddress);
                          this.args.commitSuccess.accept(commitArgs);
                      }, this.args.executor)
                      .exceptionally(ex -> handleProcessingException(ex, commitArgs));
          } catch (Throwable ex) {
              handleProcessingException(ex, commitArgs);
  
              // Even though we invoked the dataFrameCommitFailureCallback() - which was for the DurableLog to handle,
              // we still need to fail the current call, which most likely leads to failing the LogItem that triggered this.
              throw ex;
          }
      }
docs: Publishes a data frame to the DataFrameLog. The outcome of the publish operation, whether success or failure, is
  routed to the appropriate callback handlers given in this constructor. This method is called synchronously by the
  DataFrameOutputStream, via the LogItem.serialize() method through the append() method, and as such, it is executed
  on the same thread that invoked append().
  
  @param dataFrame The data frame to publish.
  @throws NullPointerException     If the data frame is null.
  @throws IllegalArgumentException If the data frame is not sealed.