Class FIFOBandwidthLimiter

java.lang.Object
net.i2p.router.transport.FIFOBandwidthLimiter

public class FIFOBandwidthLimiter
extends Object
Concurrent plan: It's difficult to get rid of the locks on _pendingInboundRequests since locked_satisyInboundAvailable() leaves Requests on the head of the queue. When we go to Java 6, we can convert from a locked ArrayList to a LinkedBlockingDeque, where locked_sIA will poll() from the head of the queue, and if the request is not fully satisfied, offerFirst() (i.e. push) it back on the head. Ditto outbound of course. In the meantime, for Java 5, we have lockless 'shortcut' methods for the common case where we are under the bandwidth limits. And the volatile counters are now AtomicIntegers / AtomicLongs.