Class ReRunThrottler


  • public class ReRunThrottler
    extends Object
    Utility for throttling method runs for at least checkInterval Example usage:
     private final ReRunThrottler throttler = new ReRunThrottler(ConfigurationFactory.getInstance().getCheckInterval());
     ...
     public void someMethod() {
       if (throttler.shouldThrottle()) return;
       // do stuff
     }
     
    • Field Detail

      • checkInterval

        public final int checkInterval
    • Constructor Detail

      • ReRunThrottler

        public ReRunThrottler()
      • ReRunThrottler

        public ReRunThrottler​(int checkInterval)
    • Method Detail

      • shouldThrottle

        public boolean shouldThrottle()