类 AbstractStateRouter
- java.lang.Object
-
- org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
-
- 所有已实现的接口:
Comparable<StateRouter>
,StateRouter
public abstract class AbstractStateRouter extends Object implements StateRouter
The abstract class of StateRoute.- 从以下版本开始:
- 3.0
-
-
字段概要
-
从接口继承的字段 org.apache.dubbo.rpc.cluster.router.state.StateRouter
DEFAULT_PRIORITY
-
-
构造器概要
构造器 构造器 说明 AbstractStateRouter(URL url, RouterChain chain)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 int
getPriority()
URL
getUrl()
Get the router url.boolean
isForce()
boolean
isRuntime()
To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.<T> void
notify(List<Invoker<T>> invokers)
void
pool()
<T> BitList<Invoker<T>>
route(BitList<Invoker<T>> invokers, RouterCache<T> cache, URL url, Invocation invocation)
Filter invokers with current routing rule and only return the invokers that comply with the rule.void
setForce(boolean force)
void
setPriority(int priority)
void
setUrl(URL url)
<T> Boolean
tagMatchFail(BitList<Invoker<T>> invokers)
-
从接口继承的方法 org.apache.dubbo.rpc.cluster.router.state.StateRouter
compareTo, getName, isEnable, pool, shouldRePool, stop
-
-
-
-
构造器详细资料
-
AbstractStateRouter
public AbstractStateRouter(URL url, RouterChain chain)
-
-
方法详细资料
-
notify
public <T> void notify(List<Invoker<T>> invokers)
- 指定者:
notify
在接口中StateRouter
-
getUrl
public URL getUrl()
从接口复制的说明:StateRouter
Get the router url.- 指定者:
getUrl
在接口中StateRouter
- 返回:
- url
-
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.
-
isForce
public boolean isForce()
- 指定者:
isForce
在接口中StateRouter
-
setForce
public void setForce(boolean force)
-
getPriority
public int getPriority()
- 指定者:
getPriority
在接口中StateRouter
-
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 listcache
- router address cacheurl
- refer urlinvocation
- invocation- 返回:
- routed invokers
- 抛出:
RpcException
-
pool
public void pool()
- 指定者:
pool
在接口中StateRouter
-
-