// ReloadOptions parses the config options and initializes the Bee.
488120
func (mod *mastodonBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("server", &mod.server)
	options.Bind("client_id", &mod.clientID)
	options.Bind("client_secret", &mod.clientSecret)
	options.Bind("email", &mod.email)
	options.Bind("password", &mod.password)
}
125784
func (mod *SerialBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("device", &mod.device)
	options.Bind("baudrate", &mod.baudrate)
}
939642
func (d *DNSServer) ReloadConfig(newCfg *config.RuntimeConfig) error {
	cfg, err := GetDNSConfig(newCfg)
	if err != nil {
		return err
	}
	d.config.Store(cfg)
	d.toggleRecursorHandlerFromConfig(cfg)
	return nil
}
1177625
func (mod *NagiosBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("url", &mod.url)
	options.Bind("user", &mod.user)
	options.Bind("password", &mod.password)
}
1082039
func (mod *WebBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.addr)
}
632692
func (s *Server) Reload(config *ddaemon.Config) {
	debugEnabled := utils.IsDebugEnabled()
	switch {
	case debugEnabled && !config.Debug: // disable debug
		utils.DisableDebug()
		s.routerSwapper.Swap(s.createMux())
	case config.Debug && !debugEnabled: // enable debug
		utils.EnableDebug()
		s.routerSwapper.Swap(s.createMux())
	}
}
863169
func (r *Event) Reload() (*Event, error) {
	return r.collection.Get(r.Metadata.Name)
}
1165894
func (a GatewayUnsupported) ReloadFormat(ctx context.Context, dryRun bool) error {
	return NotImplemented{}
}
629068
func (c *ConfigFile) Reload() (err error) {
	var cfg *ConfigFile
	if len(c.fileNames) == 1 {
		cfg, err = LoadConfigFile(c.fileNames[0])
	} else {
		cfg, err = LoadConfigFile(c.fileNames[0], c.fileNames[1:]...)
	}

	if err == nil {
		*c = *cfg
	}
	return err
}
814136
func (s *ElasticsearchDestinationUpdate) SetRetryOptions(v *ElasticsearchRetryOptions) *ElasticsearchDestinationUpdate {
	s.RetryOptions = v
	return s
}
1214845
func (do *Domain) Reload() error {
	failpoint.Inject("ErrorMockReloadFailed", func(val failpoint.Value) {
		if val.(bool) {
			failpoint.Return(errors.New("mock reload failed"))
		}
	})

	// Lock here for only once at the same time.
	do.m.Lock()
	defer do.m.Unlock()

	startTime := time.Now()

	var err error
	var latestSchemaVersion int64

	ver, err := do.store.CurrentVersion()
	if err != nil {
		return err
	}

	schemaVersion := int64(0)
	oldInfoSchema := do.infoHandle.Get()
	if oldInfoSchema != nil {
		schemaVersion = oldInfoSchema.SchemaMetaVersion()
	}

	var (
		fullLoad        bool
		changedTableIDs []int64
	)
	latestSchemaVersion, changedTableIDs, fullLoad, err = do.loadInfoSchema(do.infoHandle, schemaVersion, ver.Ver)
	metrics.LoadSchemaDuration.Observe(time.Since(startTime).Seconds())
	if err != nil {
		metrics.LoadSchemaCounter.WithLabelValues("failed").Inc()
		return err
	}
	metrics.LoadSchemaCounter.WithLabelValues("succ").Inc()

	if fullLoad {
		logutil.Logger(context.Background()).Info("full load and reset schema validator")
		do.SchemaValidator.Reset()
	}
	do.SchemaValidator.Update(ver.Ver, schemaVersion, latestSchemaVersion, changedTableIDs)

	lease := do.DDL().GetLease()
	sub := time.Since(startTime)
	// Reload interval is lease / 2, if load schema time elapses more than this interval,
	// some query maybe responded by ErrInfoSchemaExpired error.
	if sub > (lease/2) && lease > 0 {
		logutil.Logger(context.Background()).Warn("loading schema takes a long time", zap.Duration("take time", sub))
	}

	return nil
}
573576
func (m *memory) reload() error {
	m.Lock()

	// merge sets
	set, err := m.opts.Reader.Merge(m.sets...)
	if err != nil {
		m.Unlock()
		return err
	}

	// set values
	m.vals, _ = m.opts.Reader.Values(set)
	m.snap = &loader.Snapshot{
		ChangeSet: set,
		Version:   fmt.Sprintf("%d", time.Now().Unix()),
	}

	m.Unlock()

	// update watchers
	m.update()

	return nil
}
200392
func LoadOptions(ops Options) {
	options = ops

	// Check option boundaries
	if options.ESStartupTimeout < minTimeout {
		log.WithFields(logrus.Fields{
			"mintimeout": minTimeout,
		}).Debug("Overriding Elastic startup timeout")
		options.ESStartupTimeout = minTimeout
	}

	if options.ZKReconnectStartDelay < 1 {
		log.WithFields(logrus.Fields{
			"reconnectstartdelay": options.ZKReconnectStartDelay,
		}).Debug("ZK_RECONNECT_START_DELAY too low; Resetting to 1 second")
		options.ZKReconnectStartDelay = 1
	}
	if options.ZKReconnectMaxDelay < 1 {
		log.WithFields(logrus.Fields{
			"reconnectmaxdelay": options.ZKReconnectMaxDelay,
		}).Debug("ZK_RECONNECT_MAX_DELAY too low; Resetting to 1 second")
		options.ZKReconnectMaxDelay = 1
	}
	if options.ZKReconnectStartDelay > options.ZKReconnectMaxDelay {
		log.WithFields(logrus.Fields{
			"reconnectstartdelay": options.ZKReconnectStartDelay,
			"reconnectmaxdelay":   options.ZKReconnectMaxDelay,
		}).Debug("ZK_RECONNECT_START_DELAY too large; Resetting to ZK_RECONNECT_MAX_DELAY")
		options.ZKReconnectStartDelay = options.ZKReconnectMaxDelay
	}
}
770748
func (mod *HorizonBoxBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.address)
	options.Bind("user", &mod.user)
	options.Bind("password", &mod.password)
	options.Bind("interval", &mod.interval)
}
1004755
func (s *RedshiftDestinationDescription) SetRetryOptions(v *RedshiftRetryOptions) *RedshiftDestinationDescription {
	s.RetryOptions = v
	return s
}
764184
func (bf *Filter) Reload(filter *wire.MsgFilterLoad) {
	bf.mtx.Lock()
	bf.msgFilterLoad = filter
	bf.mtx.Unlock()
}
227525
func (mod *IrcBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.server)
	options.Bind("nick", &mod.nick)
	options.Bind("password", &mod.password)
	options.Bind("ssl", &mod.ssl)
	options.Bind("channels", &mod.channels)

	mod.ContextSet("channels", &mod.channels)
}