code: private void completeWrite(Write write) {
          Timer t = write.complete();
          if (t != null) {
              this.metrics.bookKeeperWriteCompleted(write.data.getLength(), t.getElapsed());
          }
      }
docs: Completes the given Write and makes any necessary internal updates.
  
  @param write The write to complete.