Class MultiDestConditionRouter<T>
java.lang.Object
org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
org.apache.dubbo.rpc.cluster.router.condition.MultiDestConditionRouter<T>
- All Implemented Interfaces:
StateRouter<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiDestConditionRouter(org.apache.dubbo.common.URL url, MultiDestCondition multiDestCondition, boolean force, boolean enabled) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanisForce()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.voidsetEnabled(boolean enabled) voidsetForce(boolean force) voidsetMatcherFactories(List<ConditionMatcherFactory> matcherFactories) voidsetThenCondition(List<ConditionSubSet> thenCondition) voidsetWhenCondition(Map<String, ConditionMatcher> whenCondition) Methods inherited from class org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
buildSnapshot, getNextRouter, getRuleRepository, getUrl, isRuntime, notify, route, setNextRouter, setUrlMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.rpc.cluster.router.state.StateRouter
stop
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
MultiDestConditionRouter
public MultiDestConditionRouter(org.apache.dubbo.common.URL url, MultiDestCondition multiDestCondition, boolean force, boolean enabled)
-
-
Method Details
-
init
-
setWhenCondition
-
setThenCondition
-
setForce
public void setForce(boolean force) - Overrides:
setForcein classAbstractStateRouter<T>
-
getWhenCondition
-
isForce
public boolean isForce()Description copied from interface: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.- Specified by:
isForcein interfaceStateRouter<T>- Overrides:
isForcein classAbstractStateRouter<T>- Returns:
- true to execute if none of invokers matches the current router
-
getThenCondition
-
getMatcherFactories
-
setMatcherFactories
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled)
-