Package org.apache.activemq.management

Examples of org.apache.activemq.management.TimeStatisticImpl


        dispatched = new CountStatisticImpl("dispatched", "The number of messages that have been dispatched from the destination");
        dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been acknowledged from the destination");
        consumers = new CountStatisticImpl("consumers", "The number of consumers that that are subscribing to messages from the destination");
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("consumers", consumers);
        addStatistic("messages", messages);
View Full Code Here


        consumers.setDoReset(false);
        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
        producers.setDoReset(false);
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("inflight", inflight);
        addStatistic("consumers", consumers);
View Full Code Here

        consumers.setDoReset(false);
        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
        producers.setDoReset(false);
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("inflight", inflight);
        addStatistic("expired", expired)
View Full Code Here

    /**
     * Use case for TimeStatisticImpl class.
     * @throws Exception
     */
    public void testStatistic() throws Exception {
        TimeStatisticImpl stat = new TimeStatisticImpl("myTimer", "millis", "myDescription");
        assertStatistic(stat, "myTimer", "millis", "myDescription");

        assertEquals(0, stat.getCount());

        stat.addTime(100);
        assertEquals(1, stat.getCount());
        assertEquals(100, stat.getMinTime());
        assertEquals(100, stat.getMaxTime());

        stat.addTime(403);
        assertEquals(2, stat.getCount());
        assertEquals(100, stat.getMinTime());
        assertEquals(403, stat.getMaxTime());

        stat.addTime(50);
        assertEquals(3, stat.getCount());
        assertEquals(50, stat.getMinTime());
        assertEquals(403, stat.getMaxTime());


        assertEquals(553, stat.getTotalTime());

        Thread.sleep(500);

        stat.addTime(10);

        assertLastTimeNotStartTime(stat);

        log.info("Stat is: " + stat);

        stat.reset();

        assertEquals(0, stat.getCount());
        assertEquals(0, stat.getMinTime());
        assertEquals(0, stat.getMaxTime());
        assertEquals(0, stat.getTotalTime());

        stat.addTime(100);
        assertEquals(1, stat.getCount());
        assertEquals(100, stat.getMinTime());
        assertEquals(100, stat.getMaxTime());
        assertEquals(100, stat.getTotalTime());

    }
View Full Code Here

     */
    public MessagingStats(String componentName) {
        this.componentName = componentName;
        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);
        addStatistic("outboundExchangeRate", outboundExchangeRate);
    }
View Full Code Here

        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
        producers.setDoReset(false);
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messages.setDoReset(false);
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("inflight", inflight);
        addStatistic("expired", expired);
View Full Code Here

        inflight = new CountStatisticImpl("inflight", "The number of messages dispatched but awaiting acknowledgement");
        consumers = new CountStatisticImpl("consumers", "The number of consumers that that are subscribing to messages from the destination");
        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("inflight", inflight);
        addStatistic("consumers", consumers);
View Full Code Here

        consumers.setDoReset(false);
        producers = new CountStatisticImpl("producers", "The number of producers that that are publishing messages to the destination");
        producers.setDoReset(false);
        messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination");
        messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache");
        processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination");
        addStatistic("enqueues", enqueues);
        addStatistic("dispatched", dispatched);
        addStatistic("dequeues", dequeues);
        addStatistic("inflight", inflight);
        addStatistic("expired", expired)
View Full Code Here

TOP

Related Classes of org.apache.activemq.management.TimeStatisticImpl

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.