|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.FIFOBandwidthRefiller
public class FIFOBandwidthRefiller
Thread that runs several times a second to "give" bandwidth to FIFOBandwidthLimiter. Instantiated by FIFOBandwidthLimiter. As of 0.8.12, this also contains a counter for outbound participating bandwidth. This was a good place for it since we needed a thread for it. Public only for the properties and defaults.
Field Summary | |
---|---|
static int |
DEFAULT_BURST_SECONDS
|
static int |
DEFAULT_INBOUND_BANDWIDTH
|
static int |
DEFAULT_INBOUND_BURST_BANDWIDTH
|
static int |
DEFAULT_OUTBOUND_BANDWIDTH
Caution, 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_BANDWIDTH
|
static int |
MAX_OUTBOUND_BANDWIDTH
Max for reasonable Bloom filter false positive rate. |
static int |
MIN_INBOUND_BANDWIDTH
For now, until there is some tuning and safe throttling, we set the floor at 3KBps inbound |
static int |
MIN_INBOUND_BANDWIDTH_PEAK
For now, until there is some tuning and safe throttling, we set the floor at a 3KBps during burst |
static int |
MIN_OUTBOUND_BANDWIDTH
For now, until there is some tuning and safe throttling, we set the floor at 3KBps outbound |
static int |
MIN_OUTBOUND_BANDWIDTH_PEAK
For now, until there is some tuning and safe throttling, we set the floor at a 3KBps during burst |
static String |
PROP_INBOUND_BANDWIDTH
|
static String |
PROP_INBOUND_BANDWIDTH_PEAK
|
static String |
PROP_INBOUND_BURST_BANDWIDTH
|
static String |
PROP_OUTBOUND_BANDWIDTH
|
static String |
PROP_OUTBOUND_BANDWIDTH_PEAK
|
static String |
PROP_OUTBOUND_BURST_BANDWIDTH
|
Constructor Summary | |
---|---|
FIFOBandwidthRefiller(I2PAppContext context,
FIFOBandwidthLimiter limiter)
|
Method Summary | |
---|---|
(package private) int |
getCurrentParticipatingBandwidth()
Out bandwidth. |
(package private) int |
getInboundBurstKBytesPerSecond()
|
(package private) int |
getInboundKBytesPerSecond()
|
(package private) int |
getOutboundBurstKBytesPerSecond()
|
(package private) int |
getOutboundKBytesPerSecond()
|
(package private) void |
incrementParticipatingMessageBytes(int size)
We sent a message. |
(package private) void |
reinitialize()
|
void |
run()
|
(package private) void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_INBOUND_BANDWIDTH
public static final String PROP_OUTBOUND_BANDWIDTH
public static final String PROP_INBOUND_BURST_BANDWIDTH
public static final String PROP_OUTBOUND_BURST_BANDWIDTH
public static final String PROP_INBOUND_BANDWIDTH_PEAK
public static final String PROP_OUTBOUND_BANDWIDTH_PEAK
public static final int DEFAULT_INBOUND_BANDWIDTH
public static final int DEFAULT_OUTBOUND_BANDWIDTH
public static final int DEFAULT_INBOUND_BURST_BANDWIDTH
public static final int DEFAULT_OUTBOUND_BURST_BANDWIDTH
public static final int DEFAULT_BURST_SECONDS
public static final int MIN_INBOUND_BANDWIDTH
public static final int MIN_OUTBOUND_BANDWIDTH
public static final int MIN_INBOUND_BANDWIDTH_PEAK
public static final int MIN_OUTBOUND_BANDWIDTH_PEAK
public static final int MAX_OUTBOUND_BANDWIDTH
Constructor Detail |
---|
FIFOBandwidthRefiller(I2PAppContext context, FIFOBandwidthLimiter limiter)
Method Detail |
---|
void shutdown()
public void run()
run
in interface Runnable
void reinitialize()
int getOutboundKBytesPerSecond()
int getInboundKBytesPerSecond()
int getOutboundBurstKBytesPerSecond()
int getInboundBurstKBytesPerSecond()
void incrementParticipatingMessageBytes(int size)
size
- bytesint getCurrentParticipatingBandwidth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |