类 AbstractStateRouter<T>

    • 构造器详细资料

      • AbstractStateRouter

        public AbstractStateRouter​(org.apache.dubbo.common.URL url)
    • 方法详细资料

      • getUrl

        public org.apache.dubbo.common.URL getUrl()
        从接口复制的说明: StateRouter
        Get the router url.
        指定者:
        getUrl 在接口中 StateRouter<T>
        返回:
        url
      • setUrl

        public void setUrl​(org.apache.dubbo.common.URL url)
      • isRuntime

        public boolean isRuntime()
        从接口复制的说明: StateRouter
        To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.
        指定者:
        isRuntime 在接口中 StateRouter<T>
        返回:
        true if the router need to execute every time.
      • isForce

        public boolean isForce()
        从接口复制的说明: StateRouter
        To decide whether this router should take effect when none of the invoker can match the router rule, which means the StateRouter.route(BitList, URL, Invocation, boolean, Holder) would be empty. Most of time, most router implementation would default this value to false.
        指定者:
        isForce 在接口中 StateRouter<T>
        返回:
        true to execute if none of invokers matches the current router
      • setForce

        public void setForce​(boolean force)
      • route

        public final BitList<Invoker<T>> route​(BitList<Invoker<T>> invokers,
                                               org.apache.dubbo.common.URL url,
                                               Invocation invocation,
                                               boolean needToPrintMessage,
                                               org.apache.dubbo.common.utils.Holder<RouterSnapshotNode<T>> nodeHolder)
                                        throws RpcException
        从接口复制的说明: StateRouter
        Filter invokers with current routing rule and only return the invokers that comply with the rule. Caching address lists in BitMap mode improves routing performance.
        指定者:
        route 在接口中 StateRouter<T>
        参数:
        invokers - invoker bit list
        url - refer url
        invocation - invocation
        needToPrintMessage - whether to print router state. Such as `use router branch a`.
        返回:
        state with route result
        抛出:
        RpcException
      • setNextRouter

        public final void setNextRouter​(StateRouter<T> nextRouter)
        Next Router node state is maintained by AbstractStateRouter and this method is not allow to override. If a specified router wants to control the behaviour of continue route or not, please override supportContinueRoute()
        指定者:
        setNextRouter 在接口中 StateRouter<T>
        参数:
        nextRouter - next router node
      • buildSnapshot

        public final String buildSnapshot()
        从接口复制的说明: StateRouter
        Build Router's Current State Snapshot for QoS
        指定者:
        buildSnapshot 在接口中 StateRouter<T>
        返回:
        Current State