add spring stat support

This commit is contained in:
wenshao
2012-08-13 15:50:16 +08:00
parent 07d0386d8a
commit c93700e073
4 changed files with 8 additions and 6 deletions
@@ -97,7 +97,7 @@ public class WebAppStatManager {
Set<Object> stats = getWebAppStatSet();
for (Object stat : stats) {
WebAppStatUtils.rset(stat);
WebAppStatUtils.reset(stat);
}
}
@@ -59,13 +59,14 @@ public class WebAppStatUtils {
}
}
public static void rset(Object webStat) {
public static void reset(Object webStat) {
if (webStat.getClass() == WebAppStat.class) {
((WebAppStat) webStat).reset();
return;
}
try {
Method method = webStat.getClass().getMethod("rset");
Method method = webStat.getClass().getMethod("reset");
method.invoke(webStat);
} catch (Exception e) {
LOG.error("reset error", e);
@@ -67,7 +67,7 @@ public class SpringStatManager {
Set<Object> stats = getSpringStatSet();
for (Object stat : stats) {
SpringStatUtils.rset(stat);
SpringStatUtils.reset(stat);
}
}
}
@@ -27,13 +27,14 @@ public class SpringStatUtils {
}
}
public static void rset(Object webStat) {
public static void reset(Object webStat) {
if (webStat.getClass() == SpringStat.class) {
((SpringStat) webStat).reset();
return;
}
try {
Method method = webStat.getClass().getMethod("rset");
Method method = webStat.getClass().getMethod("reset");
method.invoke(webStat);
} catch (Exception e) {
LOG.error("reset error", e);