public class ClusterSupport<T> extends Object implements NotifyListener
| 构造器和说明 |
|---|
ClusterSupport(Class<T> interfaceClass,
List<URL> registryUrls) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy() |
Cluster<T> |
getCluster() |
protected Protocol |
getDecorateProtocol(String protocolName) |
protected Registry |
getRegistry(URL url) |
URL |
getUrl() |
void |
init() |
void |
notify(URL registryUrl,
List<URL> urls)
1 notify的执行需要串行
2 notify通知都是全量通知,在设入新的referer后,cluster需要把不再使用的referer进行回收,避免资源泄漏;
3 如果该registry对应的referer数量为0,而没有其他可用的referers,那就忽略该次通知;
4 此处对protoco进行decorator处理,当前为增加filters
|
public void init()
public void destroy()
public void notify(URL registryUrl, List<URL> urls)
1 notify的执行需要串行 2 notify通知都是全量通知,在设入新的referer后,cluster需要把不再使用的referer进行回收,避免资源泄漏; 3 如果该registry对应的referer数量为0,而没有其他可用的referers,那就忽略该次通知; 4 此处对protoco进行decorator处理,当前为增加filters
notify 在接口中 NotifyListenerpublic URL getUrl()
Copyright © 2016. All rights reserved.