Examples of CountStatistic


Examples of javax.management.j2ee.statistics.CountStatistic

    public void setStatsProvider(Layer provider) {
        this.networkManager = (NetworkManager)provider;
    }
    private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("1xxSentSipResponses");
        _1xxSentSipResponses = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("2xxSentSipResponses");
        _2xxSentSipResponses = new MutableCountStatisticImpl(c);
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

    public void setStatsProvider(Layer provider) {
        this.networkManager = (NetworkManager)provider;
    }
    private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("1xxSentSipResponses");
        _1xxSentSipResponses = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("2xxSentSipResponses");
        _2xxSentSipResponses = new MutableCountStatisticImpl(c);
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

    }
   

    private void initializeStatistics() {
        long time = System.currentTimeMillis();
        CountStatistic cs = null;
   
        cs = new CountStatisticImpl(0,
            "endPointsCreated", "",
        "The number of endpoints created using this endpoint factory"
            ,time, time);
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

  {
    boolean  equals  = super.equals( rhs ) && (rhs instanceof CountStatistic);
   
    if ( equals )
    {
      final CountStatistic  s  = (CountStatistic)rhs;
     
      equals  = getCount() == s.getCount();
    }
    return( equals );
  }
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

    }
   

    private void initializeStatistics() {
        long time = System.currentTimeMillis();
        CountStatistic cs = null;
   
        cs = new CountStatisticImpl(0,
            "SubmittedWorkCount", "",
        "Number of work objects submitted by a connector module for  execution"
        + "WorkQueue before executing",time, time);
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

      s.append(timeStatisticSpecificString());
    return ( s.toString() );
  }
  private String countStatisticSpecificString() {
    final StringBuffer s = new StringBuffer();
    final CountStatistic cs = (CountStatistic)stc;
    return ( s.append(cs.getCount()).toString() );
  }
View Full Code Here

Examples of javax.management.j2ee.statistics.CountStatistic

      super.addStatistic("WaitingThreadCount", waitingThreadCount);
   }

   public CountStatistic getCloseCount()
   {
      CountStatistic cs = (CountStatistic) getStatistic("CloseCount");
      return cs;
   }
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.CountStatistic

    protected final TimeStatistic outboundExchangeRate;

    public ManagedEndpoint(InternalEndpoint endpoint, Map<String,?> properties) {
        this.endpoint = endpoint;
        this.properties = new HashMap<String,Object>(properties);
        this.inboundExchanges = new CountStatistic("inboundExchanges", "Number of exchanges received");
        this.inboundExchangeRate = new TimeStatistic("inboundExchangeRate", "Number of exchanges received per second");
        this.outboundExchanges = new CountStatistic("outboundExchanges", "Number of exchanges sent");
        this.outboundExchangeRate = new TimeStatistic("outboundExchangeRate", "Number of exchanges sent per second");
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.CountStatistic

    /**
     * Use case for CountStatisticImple class.
     * @throws Exception
     */
    public void testStatistic() throws Exception {
        CountStatistic stat = new CountStatistic("myCounter", "seconds", "myDescription");
        assertStatistic(stat, "myCounter", "seconds", "myDescription");

        assertEquals(0, stat.getCount());

        stat.increment();
        assertEquals(1, stat.getCount());

        stat.increment();
        assertEquals(2, stat.getCount());

        stat.decrement();
        assertEquals(1, stat.getCount());

        Thread.sleep(500);

        stat.increment();

        assertLastTimeNotStartTime(stat);

        LOG.info("Counter is: " + stat);

        stat.reset();

        assertEquals(0, stat.getCount());
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.CountStatistic

    /**
     * Use case for CountStatisticImple class.
     * @throws Exception
     */
    public void testStatistic() throws Exception {
        CountStatistic stat = new CountStatistic("myCounter", "seconds", "myDescription");
        assertStatistic(stat, "myCounter", "seconds", "myDescription");

        assertEquals(0, stat.getValue());

        stat.increment();
        assertEquals(1, stat.getValue());
        assertEquals(1, stat.getUpdateCount());

        stat.increment();
        assertEquals(2, stat.getValue());
        assertEquals(2, stat.getUpdateCount());

        stat.decrement();
        assertEquals(1, stat.getValue());
        assertEquals(3, stat.getUpdateCount());

        Thread.sleep(500);

        stat.increment();
        assertEquals(4, stat.getUpdateCount());

        assertLastTimeNotStartTime(stat);

        LOG.info("Counter is: " + stat);

        stat.reset();

        assertEquals(0, stat.getValue());
        assertEquals(0, stat.getUpdateCount());
    }
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.