public class ZoneAwareClusterInvoker<T> extends AbstractClusterInvoker<T>
This extension provides a strategy to decide how to distribute traffics among them: 1. registry marked as 'preferred=true' has the highest priority. 2. check the zone the current request belongs, pick the registry that has the same zone first. 3. Evenly balance traffic between all registries based on each registry's weight.
| 构造器和说明 |
|---|
ZoneAwareClusterInvoker(Directory<T> directory) |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
doInvoke(Invocation invocation,
List<Invoker<T>> invokers,
LoadBalance loadbalance) |
destroy, getDirectory, getInterface, getRegistryUrl, getUrl, invoke, isAvailable, isDestroyed, toStringhasProxyInvokers, isServiceDiscoverypublic Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException
RpcExceptionCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.