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 | shouldThrottle(Hash h)Checks both individual and total. |
void | updateLimits(int max,
int totalMax) |
ConnThrottler(int max,
int totalMax,
long period,
SimpleTimer2 timer)max - per-peer, 0 for unlimitedtotalMax - for all peers, 0 for unlimitedperiod - msboolean isOverBy(Hash h, int over)
boolean shouldThrottle(Hash h)
public void updateLimits(int max,
int totalMax)max - per-peer, 0 for unlimitedtotalMax - for all peers, 0 for unlimited