code: public void configure(ConfigProvider configProvider) {
      ConfigBuilder builder;
  
      this.configReadLock.lock();
      try {
        builder = ConfigBuilder.withConfig(this.config);
      } finally {
        this.configReadLock.unlock();
      }
  
      Config newConfig = configProvider.provide(builder);
  
      this.configure(newConfig);
    }
docs: Replace the configuration of this instance.
  This {@link ConfigBuilder} passed to configProvider is
  preconfigured with the values of the current configuration.
  This method potentially blocks to acquire a locks when
  safely work with the configuration.
  
  @param configProvider the provider of a new configuration