afterGcUsage = lastGcInfo.getMemoryUsageAfterGc().get(poolName);
}
Set<Map.Entry<ObjectName,Long>> set = gcMBeans.entrySet();
for (Map.Entry<ObjectName,Long> e : set) {
GarbageCollectorMXBean gc =
client.getMXBean(e.getKey(),
com.sun.management.GarbageCollectorMXBean.class);
Long gcCount = e.getValue();
Long newCount = gc.getCollectionCount();
if (newCount > gcCount) {
gcMBeans.put(e.getKey(), new Long(newCount));
lastGcInfo = gc.getLastGcInfo();
if (lastGcInfo.getEndTime() > lastGcEndTime) {
gcId = lastGcInfo.getId();
lastGcStartTime = lastGcInfo.getStartTime();
lastGcEndTime = lastGcInfo.getEndTime();
beforeGcUsage = lastGcInfo.getMemoryUsageBeforeGc().get(poolName);