public class FIFOBandwidthRefiller extends Object implements Runnable
| Modifier and Type | Field and Description |
|---|---|
static int | DEFAULT_BURST_SECONDSDefault burst seconds. |
static int | DEFAULT_INBOUND_BANDWIDTHDefault inbound bandwidth. |
static int | DEFAULT_INBOUND_BURST_BANDWIDTHDefault inbound burst bandwidth. |
static int | DEFAULT_OUTBOUND_BANDWIDTHCaution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT > 32
without thinking about the implications (default connection limits, for example)
of moving the default bandwidth class from L to M, or maybe
adjusting bandwidth class boundaries. |
static int | DEFAULT_OUTBOUND_BURST_BANDWIDTHDefault outbound burst bandwidth. |
static int | MAX_OUTBOUND_BANDWIDTHMax for reasonable Bloom filter false positive rate. |
static int | MIN_INBOUND_BANDWIDTHFor now, until there is some tuning and safe throttling, we set the floor at this inbound (KBps) |
static int | MIN_INBOUND_BANDWIDTH_PEAKFor now, until there is some tuning and safe throttling, we set the floor at this during burst (KBps) |
static int | MIN_OUTBOUND_BANDWIDTHFor now, until there is some tuning and safe throttling, we set the floor at this outbound (KBps) |
static int | MIN_OUTBOUND_BANDWIDTH_PEAKFor now, until there is some tuning and safe throttling, we set the floor at this during burst (KBps) |
static String | PROP_INBOUND_BANDWIDTHProperty for inbound bandwidth. |
static String | PROP_INBOUND_BANDWIDTH_PEAKProperty for inbound bandwidth peak. |
static String | PROP_INBOUND_BURST_BANDWIDTHProperty for inbound burst bandwidth. |
static String | PROP_OUTBOUND_BANDWIDTHProperty for outbound bandwidth. |
static String | PROP_OUTBOUND_BANDWIDTH_PEAKProperty for outbound bandwidth peak. |
static String | PROP_OUTBOUND_BURST_BANDWIDTHProperty for outbound burst bandwidth. |
| Constructor and Description |
|---|
FIFOBandwidthRefiller(RouterContext context,
FIFOBandwidthLimiter limiter)Refiller keeping the given limiter's queues full. |
| Modifier and Type | Method and Description |
|---|---|
(package private) int | getCurrentParticipatingBandwidth()Out bandwidth. |
(package private) int | getCurrentParticipatingBandwidthIn()In bandwidth. |
(package private) int | getInboundBurstKBytesPerSecond() |
(package private) int | getInboundKBytesPerSecond() |
(package private) int | getMaxShareBandwidth()In Bytes per second |
(package private) int | getOutboundBurstKBytesPerSecond() |
(package private) int | getOutboundKBytesPerSecond() |
static long | getReplenishFrequency()The replenish frequency in ms. |
(package private) boolean | incrementParticipatingMessageBytes(int size,
float factor)We intend to send traffic for a participating tunnel
with the given size and adjustment factor. |
(package private) boolean | incrementParticipatingMessageBytesIn(int size,
float factor)We intend to receive traffic for a participating tunnel
with the given size and adjustment factor. |
(package private) void | reinitialize()Reset refill timing and reload configuration. |
void | run() |
static void | setReplenishFrequency(long ms)The replenish frequency in ms, bounded 5-200. |
(package private) void | shutdown()Shut down the bandwidth refiller |
public static final int DEFAULT_BURST_SECONDS
public static final int DEFAULT_INBOUND_BANDWIDTH
public static final int DEFAULT_INBOUND_BURST_BANDWIDTH
public static final int DEFAULT_OUTBOUND_BANDWIDTH
public static final int DEFAULT_OUTBOUND_BURST_BANDWIDTH
public static final int MAX_OUTBOUND_BANDWIDTH
public static final int MIN_INBOUND_BANDWIDTH
public static final int MIN_INBOUND_BANDWIDTH_PEAK
public static final int MIN_OUTBOUND_BANDWIDTH
public static final int MIN_OUTBOUND_BANDWIDTH_PEAK
public static final String PROP_INBOUND_BANDWIDTH
public static final String PROP_INBOUND_BANDWIDTH_PEAK
public static final String PROP_INBOUND_BURST_BANDWIDTH
public static final String PROP_OUTBOUND_BANDWIDTH
public static final String PROP_OUTBOUND_BANDWIDTH_PEAK
public static final String PROP_OUTBOUND_BURST_BANDWIDTH
FIFOBandwidthRefiller(RouterContext context, FIFOBandwidthLimiter limiter)
int getCurrentParticipatingBandwidth()
int getCurrentParticipatingBandwidthIn()
int getInboundBurstKBytesPerSecond()
int getInboundKBytesPerSecond()
int getMaxShareBandwidth()
int getOutboundBurstKBytesPerSecond()
int getOutboundKBytesPerSecond()
public static long getReplenishFrequency()
boolean incrementParticipatingMessageBytes(int size,
float factor)size - bytesfactor - multiplier of size for the drop calculation, 1 for no adjustmentboolean incrementParticipatingMessageBytesIn(int size,
float factor)size - bytesfactor - multiplier of size for the drop calculation, 1 for no adjustmentvoid reinitialize()
public static void setReplenishFrequency(long ms)
void shutdown()