Class ReRunThrottler
- java.lang.Object
-
- org.zeroturnaround.javarebel.integration.util.ReRunThrottler
-
public class ReRunThrottler extends Object
Utility for throttling method runs for at leastcheckIntervalExample usage:private final ReRunThrottler throttler = new ReRunThrottler(ConfigurationFactory.getInstance().getCheckInterval()); ... public void someMethod() { if (throttler.shouldThrottle()) return; // do stuff }
-
-
Field Summary
Fields Modifier and Type Field Description intcheckInterval
-
Constructor Summary
Constructors Constructor Description ReRunThrottler()ReRunThrottler(int checkInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldThrottle()
-