接口 StateRouter

    • 字段详细资料

      • DEFAULT_PRIORITY

        static final int DEFAULT_PRIORITY
        另请参阅:
        常量字段值
    • 方法详细资料

      • getUrl

        org.apache.dubbo.common.URL getUrl()
        Get the router url.
        返回:
        url
      • route

        <T> BitList<Invoker<T>> route​(BitList<Invoker<T>> invokers,
                                      RouterCache<T> cache,
                                      org.apache.dubbo.common.URL url,
                                      Invocation invocation)
                               throws RpcException
        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.
        类型参数:
        T -
        参数:
        invokers - invoker bit list
        cache - router address cache
        url - refer url
        invocation - invocation
        返回:
        routed invokers
        抛出:
        RpcException
      • notify

        default <T> void notify​(List<Invoker<T>> invokers)
      • isRuntime

        boolean isRuntime()
        To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.
        返回:
        true if the router need to execute every time.
      • isEnable

        boolean isEnable()
      • isForce

        boolean isForce()
      • getPriority

        int getPriority()
      • shouldRePool

        boolean shouldRePool()
      • pool

        void pool()
      • stop

        default void stop()