Skip to content

Commit

Permalink
Merge pull request alibaba#194 from yanlinly/master
Browse files Browse the repository at this point in the history
  • Loading branch information
yanlinly authored Oct 31, 2018
2 parents ede4111 + 563105a commit 24a2ede
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface ConfigService {
* @throws NacosException
* NacosException
*/
public String getConfig(String dataId, String group, long timeoutMs) throws NacosException;
String getConfig(String dataId, String group, long timeoutMs) throws NacosException;

/**
* Add a listener to the configuration, after the server to modify the
Expand All @@ -58,7 +58,7 @@ public interface ConfigService {
* @throws NacosException
* NacosException
*/
public void addListener(String dataId, String group, Listener listener) throws NacosException;
void addListener(String dataId, String group, Listener listener) throws NacosException;

/**
* publish config.
Expand All @@ -73,7 +73,7 @@ public interface ConfigService {
* @throws NacosException
* NacosException
*/
public boolean publishConfig(String dataId, String group, String content) throws NacosException;
boolean publishConfig(String dataId, String group, String content) throws NacosException;

/**
* Remove Config
Expand All @@ -86,7 +86,7 @@ public interface ConfigService {
* @throws NacosException
* NacosException
*/
public boolean removeConfig(String dataId, String group) throws NacosException;
boolean removeConfig(String dataId, String group) throws NacosException;

/**
* Remove Listener
Expand All @@ -98,13 +98,13 @@ public interface ConfigService {
* @param listener
* listener
*/
public void removeListener(String dataId, String group, Listener listener);
void removeListener(String dataId, String group, Listener listener);

/**
* server health info
*
* @return whether health
*/
public String getServerStatus();
String getServerStatus();

}
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ String getFixedNameSuffix(String... serverIps) {
String split = "";
for (String serverIp : serverIps) {
sb.append(split);
sb.append(serverIp);
sb.append(serverIp.replaceAll(":", "_"));
split = "-";
}
return sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,13 @@ public Boolean deleteConfig(HttpServletRequest request, HttpServletResponse resp
ParamUtils.checkParam(tag);
String clientIp = RequestUtil.getRemoteIp(request);
if (StringUtils.isBlank(tag)) {
persistService.removeAggrConfigInfo(dataId, group, tenant);
persistService.removeConfigInfo(dataId, group, tenant, clientIp, null);
} else {
persistService.removeConfigInfoTag(dataId, group, tenant, tag, clientIp, null);
}
mergeService.addMergeTask(dataId, group, tenant, tag, clientIp);
final Timestamp time = TimeUtils.getCurrentTime();
ConfigTraceService.logPersistenceEvent(dataId, group, tenant, null, time.getTime(), clientIp, ConfigTraceService.PERSISTENCE_EVENT_REMOVE, null);
EventDispatcher.fireEvent(new ConfigDataChangeEvent(false, dataId, group, tenant, tag, time.getTime()));
return true;
}

Expand Down

0 comments on commit 24a2ede

Please sign in to comment.