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. 4. Pick anyone that's available.
| Constructor and Description |
|---|
ZoneAwareClusterInvoker(Directory<T> directory) |
| Modifier and Type | Method and Description |
|---|---|
Result |
doInvoke(Invocation invocation,
List<Invoker<T>> invokers,
LoadBalance loadbalance) |
destroy, getDirectory, getInterface, getRegistryUrl, getUrl, invoke, isAvailable, isDestroyed, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdestroyAllpublic Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException
RpcExceptionCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.