Methods Summary |
---|
private javax.management.j2ee.statistics.CountStatistic | createActiveRequestCountStat(long sampleTime, long count)
return new CountStatisticImpl("ActiveRequestCount",
"Active Request Count", "count", startTime, sampleTime,count);
|
private javax.management.j2ee.statistics.CountStatistic | createAverageRespTimeStat(long sampleTime, long count)
return new CountStatisticImpl("AverageResponseTime",
"Average Response Time", "MILLISECOND", startTime, sampleTime,count);
|
private javax.management.j2ee.statistics.Statistic[] | createEmptyStats()
Statistic[] statArr1 = new Statistic[7];
statArr1[0] = createResponseTimeStat(-1, -1, -1, -1, -1);
statArr1[1] = createAverageRespTimeStat(-1, -1);
statArr1[2] = createFailoverReqCountStat(-1, -1);
statArr1[3] = createErrorRequestCountStat(-1, -1);
statArr1[4] = createActiveRequestCountStat(-1, -1);
statArr1[5] = createTotalRequestCountStat(-1, -1);
statArr1[6] = createIdempotentUrlAccessCountStat( -1, -1);
return statArr1;
|
private javax.management.j2ee.statistics.CountStatistic | createErrorRequestCountStat(long sampleTime, long count)
return new CountStatisticImpl("ErrorRequestCount",
"Error Request Count", "count", startTime, sampleTime,count);
|
private javax.management.j2ee.statistics.CountStatistic | createFailoverReqCountStat(long sampleTime, long count)
return new CountStatisticImpl("FailoverReqCount",
"Failover Request Count", "count", startTime, sampleTime,count);
|
private javax.management.j2ee.statistics.CountStatistic | createIdempotentUrlAccessCountStat(long sampleTime, long count)
return new CountStatisticImpl("IdempotentUrlAccessCount",
"Idempotent Url Access Count", "count", startTime, sampleTime,count);
|
private javax.management.j2ee.statistics.TimeStatistic | createResponseTimeStat(long maxRespTime, long totalRequests, long sampleTime, long minRespTime, long avgRespTime)
return new TimeStatisticImpl("ResponseTime", "Response Time",
"MILLISECOND", startTime, sampleTime,totalRequests,maxRespTime,
minRespTime, totalRequests*avgRespTime);
|
private javax.management.j2ee.statistics.Statistic[] | createStats(com.sun.enterprise.admin.monitor.stats.lb.InstanceStatsInterface istat)
Statistic[] emptyStats = createEmptyStats();
if(istat==null)
return emptyStats;
long avgRespTime = Long.parseLong(
istat.getApplicationStatsAverageResponseTime());
long maxRespTime = Long.parseLong(
istat.getApplicationStatsMaxResponseTime());
long minRespTime = Long.parseLong(
istat.getApplicationStatsMinResponseTime());
long noActiveReq = Long.parseLong(
istat.getApplicationStatsNumActiveRequests());
long noErrorReq = Long.parseLong(
istat.getApplicationStatsNumErrorRequests());
long noFailoverReq = Long.parseLong(
istat.getApplicationStatsNumFailoverRequests());
long noIdempotentUrlReq = Long.parseLong(
istat.getApplicationStatsNumIdempotentUrlRequests());
long totalRequests = Long.parseLong(
istat.getApplicationStatsNumTotalRequests());
long sampleTime = System.currentTimeMillis();
Statistic[] statArr = new Statistic[7];
statArr[0] = createResponseTimeStat(maxRespTime, totalRequests,
sampleTime, minRespTime, avgRespTime);
statArr[1] = createAverageRespTimeStat(sampleTime, avgRespTime);
statArr[2] = createFailoverReqCountStat(sampleTime, noFailoverReq);
statArr[3] = createErrorRequestCountStat(sampleTime, noErrorReq);
statArr[4] = createActiveRequestCountStat(sampleTime, noActiveReq);
statArr[5] = createTotalRequestCountStat(sampleTime, totalRequests);
statArr[6] = createIdempotentUrlAccessCountStat(sampleTime,
noIdempotentUrlReq);
return statArr;
|
private javax.management.j2ee.statistics.CountStatistic | createTotalRequestCountStat(long sampleTime, long count)
return new CountStatisticImpl("TotalRequestCount",
"Total Request Count", "count", startTime, sampleTime,count);
|
public javax.management.j2ee.statistics.CountStatistic | getActiveRequestCount()Returns the number of active requests
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long time = Long.parseLong(
istat.getApplicationStatsNumActiveRequests());
long sampleTime = System.currentTimeMillis();
return createActiveRequestCountStat(sampleTime,time);
}
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getAverageResponseTime()Returns average response time in milliseconds
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long avgRespTime = Long.parseLong(
istat.getApplicationStatsAverageResponseTime());
long sampleTime = System.currentTimeMillis();
return createAverageRespTimeStat(sampleTime,avgRespTime);
}
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getErrorRequestCount()Returns the number of error requests
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long time = Long.parseLong(
istat.getApplicationStatsNumErrorRequests());
long sampleTime = System.currentTimeMillis();
return createErrorRequestCountStat(sampleTime,time);
}
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getFailoverReqCount()Returns the number of failover requests
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long time = Long.parseLong(
istat.getApplicationStatsNumFailoverRequests());
long sampleTime = System.currentTimeMillis();
return createFailoverReqCountStat(sampleTime,time);
}
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getIdempotentUrlAccessCount()Returns the number of times all idempotent
urls in this application are accessed
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long time = Long.parseLong(
istat.getApplicationStatsNumIdempotentUrlRequests());
long sampleTime = System.currentTimeMillis();
return createIdempotentUrlAccessCountStat(sampleTime,time);
}
return null;
|
private com.sun.enterprise.admin.monitor.stats.lb.InstanceStatsInterface | getInstanceStats(com.sun.enterprise.admin.monitor.stats.lb.LoadBalancerStatsInterface lbstats)
if(lbstats == null)
return null;
ClusterStats [] cstats = lbstats.getClusterStats();
for(ClusterStats cstat :cstats){
for(InstanceStats istat : cstat.getInstanceStats()){
if(!istat.getId().equals(instanceName))
continue;
String appid = istat.getApplicationStatsId();
if(!appid.equals(contextRoot))
continue;
return istat;
}
}
return null;
|
public javax.management.j2ee.statistics.TimeStatistic | getResponseTime()Returns average response time in milliseconds
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long avgRespTime = Long.parseLong(
istat.getApplicationStatsAverageResponseTime());
long maxRespTime = Long.parseLong(
istat.getApplicationStatsMaxResponseTime());
long minRespTime = Long.parseLong(
istat.getApplicationStatsMinResponseTime());
long totalRequests = Long.parseLong(
istat.getApplicationStatsNumTotalRequests());
long sampleTime = System.currentTimeMillis();
return createResponseTimeStat(maxRespTime,
totalRequests, sampleTime,
minRespTime, avgRespTime);
}
return null;
|
public javax.management.j2ee.statistics.Statistic[] | getStatistics()Returns the statistics for a load-balanced server instance
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface instance = getInstanceStats(lbstats);
return createStats(instance);
|
public javax.management.j2ee.statistics.CountStatistic | getTotalRequestCount()Returns the number of total requests
LoadBalancerStatsInterface lbstats =
lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
InstanceStatsInterface istat = getInstanceStats(lbstats);
if(istat!=null){
long time = Long.parseLong(
istat.getApplicationStatsNumTotalRequests());
long sampleTime = System.currentTimeMillis();
return createTotalRequestCountStat(sampleTime,time);
}
return null;
|