Methods Summary |
---|
public void | appendStats(java.lang.StringBuffer sbuf)
sbuf.append("\n\t[Method ")
.append("name=").append(methodName).append("; ")
.append("invCount=").append(invocationCount).append("; ")
.append("success=").append(successCount).append("; ")
.append("errors=").append(errorCount).append("; ")
.append("totalTime=").append(totalExecutionTime).append("]");
|
private java.lang.String | constructMethodName(java.lang.reflect.Method method)
StringBuffer sbuf = new StringBuffer();
sbuf.append(method.getName());
Class[] paramTypes = method.getParameterTypes();
int sz = paramTypes.length;
if (sz > 0) {
String dash = "-";
for (int i=0; i<sz; i++) {
sbuf.append(dash)
.append(paramTypes[i].getName());
}
}
return sbuf.toString();
|
public long | getExecutionTime()
return totalExecutionTime;
|
public java.lang.String | getMethodName()
return this.methodName;
|
public int | getTotalInvocations()
return invocationCount;
|
public int | getTotalNumErrors()
return errorCount;
|
public int | getTotalNumSuccess()
return successCount;
|
public void | postInvoke(java.lang.Throwable th)
if (monitorOn) {
ArrayList list = (ArrayList) execThreadLocal.get();
if ( (list != null) && (list.size() > 0) ) {
int index = list.size();
Long startTime = (Long) list.remove(index-1);
synchronized(lock) {
if (th == null) {
successCount++;
} else {
errorCount++;
}
if (startTime != null) {
long diff = System.currentTimeMillis()
- startTime.longValue();
totalExecutionTime = diff;
methodStat.incrementCount(diff);
}
}
}
}
|
public void | preInvoke()
if (monitorOn) {
ArrayList list = (ArrayList) execThreadLocal.get();
if (list == null) {
list = new ArrayList(5);
execThreadLocal.set(list);
}
list.add(new Long(System.currentTimeMillis()));
synchronized (lock) {
invocationCount++;
}
}
|
public void | resetAllStats(boolean monitorOn)
successCount = 0;
errorCount = 0;
invocationCount = 0;
totalExecutionTime = 0;
this.monitorOn = monitorOn;
|
void | setMutableTimeStatisticImpl(com.sun.enterprise.admin.monitor.stats.MutableTimeStatisticImpl methodStat)
this.methodStat = methodStat;
|