类 TagDynamicStateRouter
- java.lang.Object
-
- org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
-
- org.apache.dubbo.rpc.cluster.router.tag.TagDynamicStateRouter
-
- 所有已实现的接口:
Comparable<StateRouter>,EventListener,org.apache.dubbo.common.config.configcenter.ConfigurationListener,StateRouter
public class TagDynamicStateRouter extends AbstractStateRouter implements org.apache.dubbo.common.config.configcenter.ConfigurationListener
TagDynamicStateRouter, "application.tag-router"
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringNAME-
从接口继承的字段 org.apache.dubbo.rpc.cluster.router.state.StateRouter
DEFAULT_PRIORITY
-
-
构造器概要
构造器 构造器 说明 TagDynamicStateRouter(org.apache.dubbo.common.URL url, RouterChain chain)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetName()org.apache.dubbo.common.URLgetUrl()Get the router url.booleanisEnable()booleanisForce()booleanisRuntime()To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.<T> voidnotify(List<Invoker<T>> invokers)<T> RouterCache<T>pool(List<Invoker<T>> invokers)voidprocess(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)<T> BitList<Invoker<T>>route(BitList<Invoker<T>> invokers, RouterCache<T> cache, org.apache.dubbo.common.URL url, Invocation invocation)Filter invokers with current routing rule and only return the invokers that comply with the rule.voidsetApplication(String app)booleanshouldRePool()-
从类继承的方法 org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
getPriority, pool, setForce, setPriority, setUrl, tagMatchFail
-
从接口继承的方法 org.apache.dubbo.rpc.cluster.router.state.StateRouter
compareTo, stop
-
-
-
-
构造器详细资料
-
TagDynamicStateRouter
public TagDynamicStateRouter(org.apache.dubbo.common.URL url, RouterChain chain)
-
-
方法详细资料
-
process
public void process(org.apache.dubbo.common.config.configcenter.ConfigChangedEvent event)
- 指定者:
process在接口中org.apache.dubbo.common.config.configcenter.ConfigurationListener
-
getUrl
public org.apache.dubbo.common.URL getUrl()
从接口复制的说明:StateRouterGet the router url.- 指定者:
getUrl在接口中StateRouter- 覆盖:
getUrl在类中AbstractStateRouter- 返回:
- url
-
route
public <T> BitList<Invoker<T>> route(BitList<Invoker<T>> invokers, RouterCache<T> cache, org.apache.dubbo.common.URL url, Invocation invocation) throws RpcException
从接口复制的说明:StateRouterFilter 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- 覆盖:
route在类中AbstractStateRouter- 参数:
invokers- invoker bit listcache- router address cacheurl- refer urlinvocation- invocation- 返回:
- routed invokers
- 抛出:
RpcException
-
isRuntime
public boolean isRuntime()
从接口复制的说明:StateRouterTo decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.- 指定者:
isRuntime在接口中StateRouter- 覆盖:
isRuntime在类中AbstractStateRouter- 返回:
- true if the router need to execute every time.
-
isEnable
public boolean isEnable()
- 指定者:
isEnable在接口中StateRouter
-
isForce
public boolean isForce()
- 指定者:
isForce在接口中StateRouter- 覆盖:
isForce在类中AbstractStateRouter
-
getName
public String getName()
- 指定者:
getName在接口中StateRouter
-
shouldRePool
public boolean shouldRePool()
- 指定者:
shouldRePool在接口中StateRouter
-
pool
public <T> RouterCache<T> pool(List<Invoker<T>> invokers)
- 指定者:
pool在接口中StateRouter
-
setApplication
public void setApplication(String app)
-
notify
public <T> void notify(List<Invoker<T>> invokers)
- 指定者:
notify在接口中StateRouter- 覆盖:
notify在类中AbstractStateRouter
-
-