public class ParticipatingThrottler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class | ParticipatingThrottler.ResultResult of throttling decision for tunnel participation requests. |
| Modifier and Type | Field and Description |
|---|---|
static int | _loadWeightLoad weight: how much load inflates effective ratio (0-300%, default 100%). |
static int | _maxLimitMax tunnels per peer before throttling. |
static int | _minLimitMin tunnels per peer before throttling. |
static int | _percentLimitMax pct of participating tunnels per peer. |
static int | _rejectSteepnessRejection steepness: 100=linear ramp, 200=quadratic, higher=faster escalation. |
static int | _rejectThresholdRejection threshold: start rejecting at count/limit ratio this high (30-100, default 70%). |
| Constructor and Description |
|---|
ParticipatingThrottler(RouterContext ctx)Participating throttler |
| Modifier and Type | Method and Description |
|---|---|
static int | getLoadWeight()The load weight. |
static int | getParticipatingMaxLimit()The participating maximum limit. |
static int | getParticipatingMinLimit()The participating minimum limit. |
static int | getParticipatingPctLimit()The participating percent limit. |
static int | getRejectSteepness()The rejection steepness. |
static int | getRejectThreshold()The rejection threshold. |
static void | setLoadWeight(int val)The load weight. |
static void | setParticipatingMaxLimit(int val)The participating maximum limit. |
static void | setParticipatingMinLimit(int val)The participating minimum limit. |
static void | setParticipatingPctLimit(int val)The participating percent limit. |
static void | setRejectSteepness(int val)The rejection steepness. |
static void | setRejectThreshold(int val)The rejection threshold. |
(package private) ParticipatingThrottler.Result | shouldThrottle(Hash h)Determines whether to throttle tunnel participation for the given router. |
public static volatile int _loadWeight
public static volatile int _maxLimit
public static volatile int _minLimit
public static volatile int _percentLimit
public static volatile int _rejectSteepness
public static volatile int _rejectThreshold
ParticipatingThrottler(RouterContext ctx)
public static int getLoadWeight()
public static int getParticipatingMaxLimit()
public static int getParticipatingMinLimit()
public static int getParticipatingPctLimit()
public static int getRejectSteepness()
public static int getRejectThreshold()
public static void setLoadWeight(int val)
val - load weightpublic static void setParticipatingMaxLimit(int val)
val - max limitpublic static void setParticipatingMinLimit(int val)
val - min limitpublic static void setParticipatingPctLimit(int val)
val - pct limitpublic static void setRejectSteepness(int val)
val - reject steepnesspublic static void setRejectThreshold(int val)
val - reject thresholdParticipatingThrottler.Result shouldThrottle(Hash h)
h - the hash of the router to check