# File lib/new_relic/agent/configuration/manager.rb, line 75
        def replace_or_add_config(source)
          source.freeze
          was_finished = finished_configuring?

          invoke_callbacks(:add, source)
          case source
          when HighSecuritySource then @high_security_source = source
          when EnvironmentSource  then @environment_source   = source
          when ServerSource       then @server_source        = source
          when ManualSource       then @manual_source        = source
          when YamlSource         then @yaml_source          = source
          when DefaultSource      then @default_source       = source
          else
            NewRelic::Agent.logger.warn("Invalid config format; config will be ignored: #{source}")
          end

          reset_cache
          log_config(:add, source)

          notify_finished_configuring if !was_finished && finished_configuring?
        end