public abstract class AbstractRouter extends Object implements Router
DEFAULT_PRIORITY| Constructor and Description |
|---|
AbstractRouter() |
AbstractRouter(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
Router.route(List, URL, Invocation) 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 |
setForce(boolean force) |
void |
setPriority(int priority) |
void |
setUrl(org.apache.dubbo.common.URL url) |
public AbstractRouter(org.apache.dubbo.common.URL url)
public AbstractRouter()
public org.apache.dubbo.common.URL getUrl()
Routerpublic void setUrl(org.apache.dubbo.common.URL url)
public boolean isRuntime()
Routerpublic boolean isForce()
RouterRouter.route(List, URL, Invocation) would be empty. Most of time, most router implementation would
default this value to false.public void setForce(boolean force)
public int getPriority()
RoutergetPriority in interface Routerpublic void setPriority(int priority)
public GovernanceRuleRepository getRuleRepository()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.