类 ListenableStateRouter<T>
- java.lang.Object
-
- org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
-
- org.apache.dubbo.rpc.cluster.router.condition.config.ListenableStateRouter<T>
-
- 所有已实现的接口:
EventListener,org.apache.dubbo.common.config.configcenter.ConfigurationListener,StateRouter<T>
- 直接已知子类:
AppStateRouter,ServiceStateRouter
public abstract class ListenableStateRouter<T> extends AbstractStateRouter<T> implements org.apache.dubbo.common.config.configcenter.ConfigurationListener
Abstract router which listens to dynamic configuration
-
-
构造器概要
构造器 构造器 说明 ListenableStateRouter(org.apache.dubbo.common.URL url, String ruleKey)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 BitList<Invoker<T>>doRoute(BitList<Invoker<T>> invokers, org.apache.dubbo.common.URL url, Invocation invocation, boolean needToPrintMessage, org.apache.dubbo.common.utils.Holder<RouterSnapshotNode<T>> nodeHolder, org.apache.dubbo.common.utils.Holder<String> messageHolder)booleanisForce()To decide whether this router should take effect when none of the invoker can match the router rule, which means theStateRouter.route(BitList, URL, Invocation, boolean, Holder)would be empty.voidprocess(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)voidstop()-
从类继承的方法 org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
buildSnapshot, getNextRouter, getRuleRepository, getUrl, isRuntime, notify, route, setForce, setNextRouter, setUrl
-
-
-
-
构造器详细资料
-
ListenableStateRouter
public ListenableStateRouter(org.apache.dubbo.common.URL url, String ruleKey)
-
-
方法详细资料
-
process
public void process(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)
- 指定者:
process在接口中org.apache.dubbo.common.config.configcenter.ConfigurationListener
-
doRoute
public BitList<Invoker<T>> doRoute(BitList<Invoker<T>> invokers, org.apache.dubbo.common.URL url, Invocation invocation, boolean needToPrintMessage, org.apache.dubbo.common.utils.Holder<RouterSnapshotNode<T>> nodeHolder, org.apache.dubbo.common.utils.Holder<String> messageHolder) throws RpcException
- 抛出:
RpcException
-
isForce
public boolean isForce()
从接口复制的说明:StateRouterTo decide whether this router should take effect when none of the invoker can match the router rule, which means theStateRouter.route(BitList, URL, Invocation, boolean, Holder)would be empty. Most of time, most router implementation would default this value to false.- 指定者:
isForce在接口中StateRouter<T>- 覆盖:
isForce在类中AbstractStateRouter<T>- 返回:
- true to execute if none of invokers matches the current router
-
stop
public void stop()
- 指定者:
stop在接口中StateRouter<T>
-
-