Package com.linkedin.databus.core.util

Examples of com.linkedin.databus.core.util.RateControl


      long eventRatePerSec = pConfig.getEventRatePerSec();
      long maxThrottleDurationInSecs = pConfig.getMaxThrottleDurationInSecs();

      if ((eventRatePerSec > 0) && (maxThrottleDurationInSecs > 0))
      {
        _rc = new RateControl(eventRatePerSec, maxThrottleDurationInSecs);
      }
      else
      {
        // Disable rate control
        _rc = new RateControl(Long.MIN_VALUE, Long.MIN_VALUE);
      }
    }

    final String MODULE = GoldenGateEventProducer.class.getName();
    _log = Logger.getLogger(MODULE + "." + getName());
View Full Code Here


  }

  private void run_with_mock_timer(GoldenGateEventProducer gg)
  throws NoSuchFieldException,IllegalAccessException
  {
    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

TOP

Related Classes of com.linkedin.databus.core.util.RateControl

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.