class ConnThrottler extends Object
Constructor and Description |
---|
ConnThrottler(int max,
int totalMax,
long period,
SimpleTimer2 timer) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
isOverBy(Hash h,
int over)
Checks if individual count is over the limit by this much.
|
(package private) boolean |
isThrottled(Hash h)
Checks individual count only.
|
(package private) boolean |
shouldThrottle(Hash h)
Checks both individual and total.
|
void |
updateLimits(int max,
int totalMax) |
ConnThrottler(int max, int totalMax, long period, SimpleTimer2 timer)
public void updateLimits(int max, int totalMax)
boolean shouldThrottle(Hash h)
boolean isThrottled(Hash h)
boolean isOverBy(Hash h, int over)