Solve Conflict
This commit is contained in:
parent
51cc2b1b4b
commit
77990982ef
@ -34,6 +34,7 @@ import com.alibaba.nacos.client.config.utils.ParamUtils;
|
||||
import com.alibaba.nacos.client.utils.LogUtils;
|
||||
import com.alibaba.nacos.client.utils.ParamUtil;
|
||||
import com.alibaba.nacos.client.utils.ValidatorUtils;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -25,6 +25,7 @@ import com.alibaba.nacos.client.config.filter.impl.ConfigFilterChainManager;
|
||||
import com.alibaba.nacos.client.config.filter.impl.ConfigResponse;
|
||||
import com.alibaba.nacos.client.config.listener.impl.AbstractConfigChangeListener;
|
||||
import com.alibaba.nacos.client.utils.LogUtils;
|
||||
import com.alibaba.nacos.client.utils.TenantUtil;
|
||||
import com.alibaba.nacos.common.utils.MD5Utils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class ClientWorker implements Closeable {
|
||||
* @param listeners listeners
|
||||
*/
|
||||
public void addListeners(String dataId, String group, List<? extends Listener> listeners) {
|
||||
group = null2defaultGroup(group);
|
||||
group = blank2defaultGroup(group);
|
||||
CacheData cache = addCacheDataIfAbsent(dataId, group);
|
||||
synchronized (cache) {
|
||||
|
||||
@ -169,7 +169,7 @@ public class ClientWorker implements Closeable {
|
||||
* @param listener listener
|
||||
*/
|
||||
public void removeListener(String dataId, String group, Listener listener) {
|
||||
group = null2defaultGroup(group);
|
||||
group = blank2defaultGroup(group);
|
||||
CacheData cache = getCache(dataId, group);
|
||||
if (null != cache) {
|
||||
synchronized (cache) {
|
||||
@ -349,6 +349,10 @@ public class ClientWorker implements Closeable {
|
||||
return cache;
|
||||
}
|
||||
|
||||
public CacheData getCache(String dataId, String group) {
|
||||
return getCache(dataId, group, TenantUtil.getUserTenantForAcm());
|
||||
}
|
||||
|
||||
public CacheData getCache(String dataId, String group, String tenant) {
|
||||
if (null == dataId || null == group) {
|
||||
throw new IllegalArgumentException();
|
||||
|
@ -280,7 +280,7 @@ public class UdpPushService implements ApplicationContextAware, ApplicationListe
|
||||
}
|
||||
|
||||
public static String getPushCacheKey(String serviceName, String clientIP, String agent) {
|
||||
return serviceName + UtilsAndCommons.CACHE_KEY_SPLITER + agent;
|
||||
return serviceName + UtilsAndCommons.CACHE_KEY_SPLITTER + agent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user