Class MockInvokersSelector<T>
java.lang.Object
org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
org.apache.dubbo.rpc.cluster.router.mock.MockInvokersSelector<T>
- All Implemented Interfaces:
StateRouter<T>
A specific Router designed to realize mock feature.
If a request is configured to use mock, then this router guarantees that only the invokers with protocol MOCK appear in final the invoker list, all other invokers will be excluded.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter
buildSnapshot, getNextRouter, getRuleRepository, getUrl, isForce, isRuntime, 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
-
MockInvokersSelector
public MockInvokersSelector(org.apache.dubbo.common.URL url)
-
-
Method Details
-
notify
Description copied from interface:StateRouterNotify the router the invoker list. Invoker list may change from time to time. This method gives the router a chance to prepare beforeStateRouter.route(BitList, URL, Invocation, boolean, Holder)gets called. No need to notify next node.- Specified by:
notifyin interfaceStateRouter<T>- Overrides:
notifyin classAbstractStateRouter<T>- Parameters:
invokers- invoker list
-