Package com.sun.appserv.management.j2ee.statistics

Examples of com.sun.appserv.management.j2ee.statistics.CountStatisticImpl


        return statArr;
    }
   
    private CountStatistic createAverageRespTimeStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("AverageResponseTime",
                "Average Response Time", "MILLISECOND", startTime, sampleTime,count);
    }
View Full Code Here


        return new CountStatisticImpl("AverageResponseTime",
                "Average Response Time", "MILLISECOND", startTime, sampleTime,count);
    }
    private CountStatistic createFailoverReqCountStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("FailoverReqCount",
                "Failover Request Count", "count", startTime, sampleTime,count);
    }
View Full Code Here

        return new CountStatisticImpl("FailoverReqCount",
                "Failover Request Count", "count", startTime, sampleTime,count);
    }
    private CountStatistic createErrorRequestCountStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("ErrorRequestCount",
                "Error Request Count", "count", startTime, sampleTime,count);
    }
View Full Code Here

        return new CountStatisticImpl("ErrorRequestCount",
                "Error Request Count", "count", startTime, sampleTime,count);
    }
    private CountStatistic createActiveRequestCountStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("ActiveRequestCount",
                "Active Request Count", "count", startTime, sampleTime,count);
    }
View Full Code Here

        return new CountStatisticImpl("ActiveRequestCount",
                "Active Request Count", "count", startTime, sampleTime,count);
    }
    private CountStatistic createTotalRequestCountStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("TotalRequestCount",
                "Total Request Count", "count", startTime, sampleTime,count);
    }
View Full Code Here

        return new CountStatisticImpl("TotalRequestCount",
                "Total Request Count", "count", startTime, sampleTime,count);
    }
    private CountStatistic createIdempotentUrlAccessCountStat(final long sampleTime,
            final long count) {
        return new CountStatisticImpl("IdempotentUrlAccessCount",
                "Idempotent Url Access Count", "count", startTime, sampleTime,count);
    }
View Full Code Here

     */
    public Statistic[] getStatistics() {
        LoadBalancerStatsInterface lbstats = lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
        Statistic[] statArr1 = new Statistic[3];
        StringStatistic stat11 = new StringStatisticImpl("Health", "Instance Health", "state of the server", 0, 0, "");
        CountStatistic stat21 = new CountStatisticImpl("NumberOfActiveRequests", "Number Of Active Requests", "count", 0, 0, 0);
        CountStatistic stat31 = new CountStatisticImpl("NumberOfTotalRequests", "Number Of Total Requests", "count", 0, 0, 0);
        statArr1[0]=stat11;
        statArr1[1]=stat21;
        statArr1[2]=stat31;
        if(lbstats == null)
            return statArr1;
        ClusterStats [] cstats = lbstats.getClusterStats();
        for(ClusterStats cstat :cstats){
            for(InstanceStats istat : cstat.getInstanceStats()){
                if(!istat.getId().equals(instanceName))
                    continue;
                    Statistic[] statArr = new Statistic[3];
                    String health = istat.getHealth();
                    long activeReq = Long.parseLong(istat.getNumActiveRequests());
                    long totalReq = Long.parseLong(istat.getNumTotalRequests());
                    long sampleTime = new Date().getTime();
                    StringStatistic stat1 = new StringStatisticImpl("Health", "Instance Health", "milliseconds", startTime, sampleTime, health);
                    CountStatistic stat2 = new CountStatisticImpl("NumberOfActiveRequests", "Number Of Active Requests", "count", startTime, sampleTime, activeReq);
                    CountStatistic stat3 = new CountStatisticImpl("NumberOfTotalRequests", "Number Of Total Requests", "count", startTime, sampleTime, totalReq);
                    statArr[0] = stat1;
                    statArr[1] = stat2;
                    statArr[2] = stat3;
                    return statArr;
            }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.j2ee.statistics.CountStatisticImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.