public abstract class AbstractStateRouter<T> extends Object implements StateRouter<T>
DEFAULT_PRIORITY| Constructor and Description |
|---|
AbstractStateRouter(org.apache.dubbo.common.URL url) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPriority()
Router's priority, used to sort routers.
|
GovernanceRuleRepository |
getRuleRepository() |
org.apache.dubbo.common.URL |
getUrl()
Get the router url.
|
boolean |
isForce()
To decide whether this router should take effect when none of the invoker can match the router rule, which
means the
StateRouter.route(BitList, URL, Invocation, boolean) would be empty. |
boolean |
isRuntime()
To decide whether this router need to execute every time an RPC comes or should only execute when addresses or
rule change.
|
void |
notify(BitList<Invoker<T>> invokers)
Notify the router the invoker list.
|
void |
setForce(boolean force) |
void |
setPriority(int priority) |
void |
setUrl(org.apache.dubbo.common.URL url) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareTo, route, stoppublic org.apache.dubbo.common.URL getUrl()
StateRoutergetUrl in interface StateRouter<T>public void setUrl(org.apache.dubbo.common.URL url)
public boolean isRuntime()
StateRouterisRuntime in interface StateRouter<T>public boolean isForce()
StateRouterStateRouter.route(BitList, URL, Invocation, boolean) would be empty. Most of time, most router implementation would
default this value to false.isForce in interface StateRouter<T>public void setForce(boolean force)
public int getPriority()
StateRoutergetPriority in interface StateRouter<T>public void setPriority(int priority)
public GovernanceRuleRepository getRuleRepository()
public void notify(BitList<Invoker<T>> invokers)
StateRouterStateRouter.route(BitList, URL, Invocation, boolean) gets called.notify in interface StateRouter<T>invokers - invoker listCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.