net.i2p.router.transport
Class FIFOBandwidthLimiter

java.lang.Object
  extended bynet.i2p.router.transport.FIFOBandwidthLimiter

public class FIFOBandwidthLimiter
extends java.lang.Object


Nested Class Summary
static interface FIFOBandwidthLimiter.Request
           
 
Constructor Summary
FIFOBandwidthLimiter(I2PAppContext context)
           
 
Method Summary
 long getAvailableInboundBytes()
           
 long getAvailableOutboundBytes()
           
 boolean getInboundUnlimited()
           
 long getMaxInboundBytes()
           
 long getMaxOutboundBytes()
           
 boolean getOutboundUnlimited()
           
 long getTotalAllocatedInboundBytes()
           
 long getTotalAllocatedOutboundBytes()
           
 long getTotalWastedInboundBytes()
           
 long getTotalWastedOutboundBytes()
           
(package private)  void refillBandwidthQueues(long bytesInbound, long bytesOutbound)
          More bytes are available - add them to the queue and satisfy any requests we can
 void reinitialize()
           
 void renderStatusHTML(java.io.Writer out)
           
 FIFOBandwidthLimiter.Request requestInbound(int bytesIn, java.lang.String purpose)
          Request some bytes, blocking until they become available
 FIFOBandwidthLimiter.Request requestOutbound(int bytesOut, java.lang.String purpose)
          Request some bytes, blocking until they become available
 void setInboundUnlimited(boolean isUnlimited)
           
 void setMaxInboundBytes(int numBytes)
           
 void setMaxOutboundBytes(int numBytes)
           
 void setOutboundUnlimited(boolean isUnlimited)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIFOBandwidthLimiter

public FIFOBandwidthLimiter(I2PAppContext context)
Method Detail

getAvailableInboundBytes

public long getAvailableInboundBytes()

getAvailableOutboundBytes

public long getAvailableOutboundBytes()

getTotalAllocatedInboundBytes

public long getTotalAllocatedInboundBytes()

getTotalAllocatedOutboundBytes

public long getTotalAllocatedOutboundBytes()

getTotalWastedInboundBytes

public long getTotalWastedInboundBytes()

getTotalWastedOutboundBytes

public long getTotalWastedOutboundBytes()

getMaxInboundBytes

public long getMaxInboundBytes()

setMaxInboundBytes

public void setMaxInboundBytes(int numBytes)

getMaxOutboundBytes

public long getMaxOutboundBytes()

setMaxOutboundBytes

public void setMaxOutboundBytes(int numBytes)

getInboundUnlimited

public boolean getInboundUnlimited()

setInboundUnlimited

public void setInboundUnlimited(boolean isUnlimited)

getOutboundUnlimited

public boolean getOutboundUnlimited()

setOutboundUnlimited

public void setOutboundUnlimited(boolean isUnlimited)

reinitialize

public void reinitialize()

requestInbound

public FIFOBandwidthLimiter.Request requestInbound(int bytesIn,
                                                   java.lang.String purpose)
Request some bytes, blocking until they become available


requestOutbound

public FIFOBandwidthLimiter.Request requestOutbound(int bytesOut,
                                                    java.lang.String purpose)
Request some bytes, blocking until they become available


refillBandwidthQueues

final void refillBandwidthQueues(long bytesInbound,
                                 long bytesOutbound)
More bytes are available - add them to the queue and satisfy any requests we can


renderStatusHTML

public void renderStatusHTML(java.io.Writer out)
                      throws java.io.IOException
Throws:
java.io.IOException