Class ReRunThrottler
java.lang.Object
org.zeroturnaround.javarebel.integration.util.ReRunThrottler
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
checkInterval
public final int checkInterval
-
-
Constructor Details
-
ReRunThrottler
public ReRunThrottler() -
ReRunThrottler
public ReRunThrottler(int checkInterval)
-
-
Method Details
-
shouldThrottle
public boolean shouldThrottle()
-