cluster 简介 invoker Directory Router loadbalance Failover Failfast Failsafe Failback Forking 负载均衡算法:轮询(roundrobin),最少活跃(leastActive) FsofProtocol 两个方法: export 暴露 幂等 refer 获取proxy invoker Cluster directory join Directory /** * Directory. (SPI, Prototype, ThreadSafe) * * <a href="http://en.wikipedia.org/wiki/Directory_service">Directory Service</a> * * @see com.alibaba.dubbo.rpc.cluster.Cluster#join(Directory) * @author william.liangf */ public interface Directory<T> extends Node { /** * get service type......
private Map<String, Class<?>> loadExtensionClasses() { SPI defaultAnnotation = (SPI)this.type.getAnnotation(SPI.class); if(defaultAnnotation != null) { String extensionClasses = defaultAnnotation.value(); if(extensionClasses != null && (extensionClasses = extensionClasses.trim()).length() > 0) { String[] names = NAME_SEPARATOR.split(extensionClasses); if(names.length > 1) { throw new IllegalStateException("more than 1 default extension name on extension " + this.type.getName() + ": " + Arrays.toString(names)); } if(names.length == 1) { this.cachedDefaultName = names[0]; } } } HashMap extensionClasses1 = new HashMap(); this.loadFile(extensionClasses1, "META-INF/dubbo/internal/"); this.loadFile(extensionClasses1, "META-INF/dubbo/"......