Examples of CountStatisticImpl


Examples of org.apache.geronimo.management.stats.CountStatisticImpl

        public void prepareConsumers(Map clients) {
            Map result = new HashMap();
            for (Iterator it = clients.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
                Integer count = (Integer) clients.get(client);
                CountStatisticImpl stat = (CountStatisticImpl) consumers.get(client);
                if (stat == null) {
                    stat = new CountStatisticImpl("Threads for " + client, "", "The number of threads used by the client known as '" + client + "'", count.intValue());
                    addStat(stat.getName(), stat);
                } else {
                    consumers.remove(client);
                    stat.setCount(count.intValue());
                }
                result.put(client, stat);
            }
            for (Iterator it = consumers.keySet().iterator(); it.hasNext();) {
                String client = (String) it.next();
View Full Code Here

Examples of org.apache.geronimo.management.stats.CountStatisticImpl

    private RangeStatisticImpl activeRequestCount;
    private TimeStatisticImpl requestDuration;
    private boolean statsOn=false;

    public JettyWebContainerStatsImpl() {
        totalConnectionCount = new CountStatisticImpl("Total Connections", StatisticImpl.UNIT_COUNT,
                "The total number of connections since last reset");
        openConnectionCount = new RangeStatisticImpl("Open Connections", StatisticImpl.UNIT_COUNT,
                "The number of connections open at present");
        connectionRequestCount = new RangeStatisticImpl("Connection Request Count", StatisticImpl.UNIT_COUNT,
                "The number of requests handled by a particular connection");
        connectionDuration = new TimeStatisticImpl("Connection Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The legnth of time that individual connections have been open");
        totalErrorCount = new CountStatisticImpl("Error Count", StatisticImpl.UNIT_COUNT,
                "The number of reponses that were errors since statistics gathering started");
        totalRequestCount = new CountStatisticImpl("Request Count", StatisticImpl.UNIT_COUNT,
                "The number of requests that were handled since statistics gathering started");
        activeRequestCount = new RangeStatisticImpl("Active Request Count", StatisticImpl.UNIT_COUNT,
                "The number of requests being processed concurrently");
        requestDuration = new TimeStatisticImpl("Request Duration", StatisticImpl.UNIT_TIME_MILLISECOND,
                "The length of time that it's taken to handle individual requests");
View Full Code Here

Examples of org.apache.servicemix.jbi.monitoring.stats.CountStatisticImpl

     * Default Constructor
     * @param name
     */
    public MessagingStats(String name) {
        this.name = name;
        inboundExchanges = new CountStatisticImpl("inboundExchanges", "Number of Inbound MessageExchanges");
        outboundExchanges = new CountStatisticImpl("outboundExchanges", "Number of Outbound MessageExchanges");
        inboundExchangeRate = new TimeStatisticImpl("inboundExchangeRate", "time taken to process an Exchange");
        outboundExchangeRate = new TimeStatisticImpl("outboundExchangeRate", "time taken to send an Exchange");
        addStatistic("inboundExchanges", inboundExchanges);
        addStatistic("outboundExchanges", outboundExchanges);
        addStatistic("inboundExchangeRate", inboundExchangeRate);
View Full Code Here

Examples of org.glassfish.external.statistics.impl.CountStatisticImpl

        super.initialize("org.glassfish.enterprise.iiop.util.ThreadPoolStats");

        final long time = System.currentTimeMillis();

        numberOfBusyThreads =
                new CountStatisticImpl(threadPool.numberOfBusyThreads(), stringNumberOfBusyThreads, "COUNT",
                threadPool.getWorkQueue(0).toString(),
                time, time);

        numberOfAvailableThreads =
                new CountStatisticImpl(
                threadPool.numberOfAvailableThreads(), stringNumberOfAvailableThreads, "count",
                threadPool.getWorkQueue(0).toString(),
                time, time);

        currentNumberOfThreads =
                new BoundedRangeStatisticImpl(
                threadPool.currentNumberOfThreads(), threadPool.maximumNumberOfThreads(), threadPool.minimumNumberOfThreads(), java.lang.Long.MAX_VALUE, 0,
                stringCurrentNumberOfThreads, "count",
                threadPool.getWorkQueue(0).toString(),
                time, time);

        averageWorkCompletionTime =
                new BoundedRangeStatisticImpl(
                threadPool.averageWorkCompletionTime(), 0, 0, java.lang.Long.MAX_VALUE, 0,
                stringAverageWorkCompletionTime, "Milliseconds",
                threadPool.getWorkQueue(0).toString(),
                time, time);

        // WorkQueue workItems = threadPool.getWorkQueue(0);

        totalWorkItemsAdded =
                new CountStatisticImpl(
                workQueue.totalWorkItemsAdded(), stringTotalWorkItemsAdded, "count",
                workQueue.getName(),
                time, time);

        numberOfWorkItemsInQueue =
View Full Code Here

Examples of org.jboss.management.j2ee.statistics.CountStatisticImpl

    */
   public Stats getstats()
   {
      try
      {
         CountStatisticImpl readyCount = (CountStatisticImpl) stats.getActiveCount();
         Long count = (Long) server.getAttribute(jtaServiceName, "TransactionCount");
         readyCount.set(count.longValue());
         CountStatisticImpl commitCount = (CountStatisticImpl) stats.getCommittedCount();
         count = (Long) server.getAttribute(jtaServiceName, "CommitCount");
         commitCount.set(count.longValue());
         CountStatisticImpl rollbackCount = (CountStatisticImpl) stats.getRolledbackCount();
         count = (Long) server.getAttribute(jtaServiceName, "RollbackCount");
         rollbackCount.set(count.longValue());
      }
      catch (Exception e)
      {
         log.debug("Failed to retrieve stats", e);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.