public class RateLimiter
extends java.lang.Object
Constructor and Description |
---|
RateLimiter(double creditsPerSecond,
double maxBalance) |
RateLimiter(double creditsPerSecond,
double maxBalance,
Clock clock) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkCredit(double itemCost) |
public RateLimiter(double creditsPerSecond, double maxBalance)
public RateLimiter(double creditsPerSecond, double maxBalance, Clock clock)