pub(crate) fn register_dispatcher(&self, dispatcher: &Arc<Box<Dispatcher>>) -> AnyResult<()> {
        let dispatcher_type = dispatcher.dispatcher_type();
        let is_registered = self.dispatchers.contains_key(&dispatcher_type);

        if is_registered && dispatcher_type != DispatcherType::Anonymous {
            warn!(
                "The dispatcher with the '{:?}' name already registered in the cluster.",
                dispatcher_type
            );
            return Ok(());
        }

        let instance = dispatcher.clone();
        self.dispatchers.insert(dispatcher_type, instance)?;
        Ok(())
    }
/// Adds dispatcher to the global registry.
Adds dispatcher to the global registry.
Adds dispatcher to the global registry .
pub(crate) fn register_dispatcher(&self, dispatcher: &Arc<Box<Dispatcher>>) -> AnyResult<()> {
        let dispatcher_type = dispatcher.dispatcher_type();
        let is_registered = self.dispatchers.contains_key(&dispatcher_type);
        if is_registered && dispatcher_type != DispatcherType::Anonymous {
            warn!(
                "The dispatcher with the '{:?}' name already registered in the cluster.",
                dispatcher_type
            );
            return Ok(());
        }
        let instance = dispatcher.clone();
        self.dispatchers.insert(dispatcher_type, instance)?;
        Ok(())
    }
pub ( crate ) fn register_dispatcher ( & self , dispatcher : & Arc < Box < Dispatcher > > ) -> AnyResult < ( ) > { let dispatcher_type = dispatcher . dispatcher_type ( ) ; let is_registered = self . dispatchers . contains_key ( & dispatcher_type ) ; if is_registered && dispatcher_type != DispatcherType :: Anonymous { warn ! ( " " dispatcher_type ) ; return Ok ( ( ) ) ; } let instance = dispatcher . clone ( ) ; self . dispatchers . insert ( dispatcher_type , instance ) ? ; Ok ( ( ) ) }
Adds dispatcher to the global registry.
Adds dispatcher to the global registry .
&self
dispatcher
&Arc<Box<Dispatcher>>
&self
dispatcher
&Arc<Box<Dispatcher>>