Class ScriptStateRouter<T>
java.lang.Object
org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
org.apache.dubbo.rpc.cluster.router.script.ScriptStateRouter<T>
- All Implemented Interfaces:
StateRouter<T>
ScriptRouter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisForce()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.booleanTo decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.Methods inherited from class org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
buildSnapshot, getNextRouter, getRuleRepository, getUrl, notify, route, setForce, 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
-
ScriptStateRouter
public ScriptStateRouter(org.apache.dubbo.common.URL url)
-
-
Method Details
-
isRuntime
public boolean isRuntime()Description copied from interface:StateRouterTo decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.- Specified by:
isRuntimein interfaceStateRouter<T>- Overrides:
isRuntimein classAbstractStateRouter<T>- Returns:
- true if the router need to execute every time.
-
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
-