DUBBO-234 redis注册中心健状性处理
git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@1221 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
4c9276b60f
commit
0e017b4405
|
|
@ -1059,6 +1059,10 @@ public final class URL implements Serializable {
|
|||
return getParameter(Constants.INTERFACE_KEY, path);
|
||||
}
|
||||
|
||||
public URL setServiceInterface(String service) {
|
||||
return addParameter(Constants.INTERFACE_KEY, service);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
|
|
|
|||
|
|
@ -331,6 +331,13 @@ public class RedisRegistry extends FailbackRegistry {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (urls != null && urls.isEmpty() && url.getParameter(Constants.ADMIN_KEY, false)) {
|
||||
URL empty = url.setProtocol(Constants.EMPTY_PROTOCOL);
|
||||
if (Constants.ANY_VALUE.equals(empty.getServiceInterface())) {
|
||||
empty = empty.setServiceInterface(service.substring(root.length()));
|
||||
}
|
||||
urls.add(empty);
|
||||
}
|
||||
for (NotifyListener listener : listeners) {
|
||||
notify(url, listener, urls);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue