类 RpcModule

    • 构造器详细资料

      • RpcModule

        public RpcModule()
    • 方法详细资料

      • afterPropertiesSet

        public final void afterPropertiesSet()
                                      throws NulsException
        从接口复制的说明: InitializingBean
        该方法在所有属性被设置之后调用,用于辅助对象初始化 This method is invoked after all properties are set, and is used to assist object initialization.
        指定者:
        afterPropertiesSet 在接口中 InitializingBean
        抛出:
        NulsException
      • getTryRuningTimeout

        protected long getTryRuningTimeout()
      • getRole

        protected String getRole()
      • isRunning

        protected boolean isRunning()
        模块是否已运行
        返回:
      • isReady

        protected boolean isReady()
        模块是否已准备好
        返回:
      • isDependencieReady

        public boolean isDependencieReady​(Module module)
        获取依赖模块的准备状态
        参数:
        module -
        返回:
        true 已准备好
      • hasDependent

        public boolean hasDependent​(ModuleE moduleE)
      • hasDependent

        public boolean hasDependent​(Module module)
      • isDependencieReady

        public boolean isDependencieReady​(String moduleName)
      • isDependencieReady

        protected boolean isDependencieReady()
        依赖模块都以进入Ready状态
      • getDependencies

        public Set<Module> getDependencies()
      • declareDependent

        public abstract Module[] declareDependent()
        申明此模块的依赖模块
        返回:
      • getRpcCmdPackage

        public Set<String> getRpcCmdPackage()
        指定RpcCmd的包名
        返回:
      • moduleInfo

        public abstract Module moduleInfo()
        返回当前模块的描述
        返回:
      • onDependenciesReady

        public void onDependenciesReady​(Module module)
      • init

        public void init()
        初始化模块 在onStart前会调用此方法
      • doStart

        public abstract boolean doStart()
        已完成spring init注入,开始启动模块 模块进入ready状态前的准备工作,模块启动时触发 如果准备完毕返回true 条件未达到返回false
        返回:
      • onDependenciesReady

        public abstract RpcModuleState onDependenciesReady()
        所有外部依赖进入ready状态后会调用此方法,正常启动后返回Running状态
        返回:
      • onDependenciesLoss

        public abstract RpcModuleState onDependenciesLoss​(Module dependenciesModule)
        某个外部依赖连接丢失后,会调用此方法, 可控制模块状态,如果返回Ready,则表明模块退化到Ready状态,当依赖重新准备完毕后,将重新触发onDependenciesReady方法, 若返回的状态是Running,将不会重新触发onDependenciesReady
        参数:
        dependenciesModule -
        返回:
      • getLanguagePath

        protected String getLanguagePath()
      • getROLE

        public static String getROLE()
      • setFollowerList

        public void setFollowerList​(Map<Module,​Boolean> followerList)
      • setDependentReadyState

        public void setDependentReadyState​(Map<Module,​Boolean> dependentReadyState)
      • setNotifySender

        public void setNotifySender​(NotifySender notifySender)