docs: synchronized void registerView(View view, Clock clock) {
      exportedViews = null;
      View existing = registeredViews.get(view.getName());
      if (existing != null) {
        if (existing.equals(view)) {
          // Ignore views that are already registered.
          return;
        } else {
          throw new IllegalArgumentException(
              "A different view with the same name is already registered: " + existing);
        }
      }
      Measure measure = view.getMeasure();
      Measure registeredMeasure = registeredMeasures.get(measure.getName());
      if (registeredMeasure != null && !registeredMeasure.equals(measure)) {
        throw new IllegalArgumentException(
            "A different measure with the same name is already registered: " + registeredMeasure);
      }
      registeredViews.put(view.getName(), view);
      if (registeredMeasure == null) {
        registeredMeasures.put(measure.getName(), measure);
      }
      Timestamp now = clock.now();
      mutableMap.put(view.getMeasure().getName(), MutableViewData.create(view, now));
    }