...
|
...
|
@@ -42,6 +42,8 @@ public class MemcachedMonitService { |
|
|
Map<String, List<MObjectInfo>> memcachedMap = queryAllMoListByLogic("memcached");
|
|
|
|
|
|
if (memcachedMap.isEmpty()) {
|
|
|
//要监控内容为空,则清空map
|
|
|
MemConstants.MEMCACHED_RELATE_MAP.clear();
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -52,6 +54,14 @@ public class MemcachedMonitService { |
|
|
executorService.submit(new MemcachedTask(entry.getKey(), entry.getValue()));
|
|
|
}
|
|
|
|
|
|
|
|
|
for(String key:MemConstants.MEMCACHED_RELATE_MAP.keySet()){
|
|
|
//把被移除的对象从缓存中清除
|
|
|
if(!memcachedMap.keySet().contains(key)){
|
|
|
MemConstants.MEMCACHED_RELATE_MAP.remove(key);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
executorService.shutdown();
|
|
|
}
|
|
|
|
...
|
...
|
|