类 ZoneAwareClusterInvoker<T>
- java.lang.Object
-
- org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker<T>
-
- org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker<T>
-
- 所有已实现的接口:
Node
,ClusterInvoker<T>
,Invoker<T>
public class ZoneAwareClusterInvoker<T> extends AbstractClusterInvoker<T>
When there're more than one registry for subscription.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.
-
-
构造器概要
构造器 构造器 说明 ZoneAwareClusterInvoker(Directory<T> directory)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Result
doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance)
-
从类继承的方法 org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker
destroy, getDirectory, getInterface, getRegistryUrl, getUrl, invoke, isAvailable, isDestroyed, toString
-
从接口继承的方法 org.apache.dubbo.rpc.cluster.ClusterInvoker
hasProxyInvokers, isServiceDiscovery
-
-
-
-
方法详细资料
-
doInvoke
public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException
- 抛出:
RpcException
-
-