code: private <R> R execute(String segmentName, Callable<R> operation) throws StreamSegmentException {
          Exceptions.checkNotClosed(this.closed.get(), this);
          try {
              return operation.call();
          } catch (Exception e) {
              return throwException(segmentName, e);
          }
      }
docs: Executes the given Callable and returns its result, while translating any Exceptions bubbling out of it into
  StreamSegmentExceptions.
  
  @param segmentName   Full name of the StreamSegment.
  @param operation     The function to execute.
  @param <R>           Return type of the operation.
  @return Instance of the return type of the operation.