Package com.linkedin.databus.core.util.RateMonitor

Examples of com.linkedin.databus.core.util.RateMonitor.MockRateMonitor.start()


  {
    RateControl rc = gg.getRateControl();

    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(0L);
    mrm.start();

    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
  }
View Full Code Here


    Assert.assertEquals(true, rc.isEnabled());

    long curTime = 0L;
    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(curTime);
    mrm.start();

    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
View Full Code Here

  public void testIncrementEventCount() throws Exception
  {
    RateControl rc = new RateControl(2,1);
    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(0L);
    mrm.start();

    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
View Full Code Here

    RateControl rc = new RateControl(10,1);
    Assert.assertEquals(true, rc.isEnabled());
    long curTime = 0L;
    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(curTime);
    mrm.start();
    Field field2 = rc.getClass().getDeclaredField("_ra");
    field2.setAccessible(true);
    field2.set(rc, mrm);
     
    curTime = (1L * DbusConstants.NUM_NSECS_IN_SEC) - 10;
View Full Code Here

    RateControl rc = new RateControl(10,1);
    Assert.assertEquals(true, rc.isEnabled());
    long curTime = 0L;
    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(curTime);
    mrm.start();

    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
     
View Full Code Here

    RateControl rc = new RateControl(10,1);
    Assert.assertEquals(true, rc.isEnabled());
    long curTime = 0L;
    MockRateMonitor mrm = new MockRateMonitor("mock");
    mrm.setNanoTime(curTime);
    mrm.start();

    Field field = rc.getClass().getDeclaredField("_ra");
    field.setAccessible(true);
    field.set(rc, mrm);
   
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.