类 AbstractStateRouter

    • 构造器详细资料

      • AbstractStateRouter

        public AbstractStateRouter​(URL url,
                                   RouterChain chain)
    • 方法详细资料

      • setUrl

        public void setUrl​(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
        返回:
        true if the router need to execute every time.
      • setForce

        public void setForce​(boolean force)
      • setPriority

        public void setPriority​(int priority)
      • route

        public <T> BitList<Invoker<T>> route​(BitList<Invoker<T>> invokers,
                                             RouterCache<T> cache,
                                             URL url,
                                             Invocation invocation)
                                      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
        参数:
        invokers - invoker bit list
        cache - router address cache
        url - refer url
        invocation - invocation
        返回:
        routed invokers
        抛出:
        RpcException