Authored by qinchao

切换lb改为异步

... ... @@ -41,7 +41,7 @@ public class NginxSwitchCtrl {
private long sleepTime=10*1000L;
private volatile AtomicInteger valueCount=new AtomicInteger(1);
private AtomicInteger valueCount=new AtomicInteger(1);
private Map<String,BaseResponse> switchLbResponseMap=new ConcurrentHashMap<>();
... ... @@ -60,6 +60,9 @@ public class NginxSwitchCtrl {
Set<String> nowIDset=switchLbResponseMap.keySet();
List<String> ids=Lists.newArrayList(rtnID.split(","));
if(nowIDset.containsAll(ids)){
for(String id:ids){
switchLbResponseMap.remove(id);
}
return new BaseResponse();
}
return new BaseResponse(201,"not finished");
... ...