org.xnap.io
Class BandwidthManager
java.lang.Object
org.xnap.io.BandwidthManager
- Direct Known Subclasses:
- UploadBandwidthManager
public class BandwidthManager
- extends java.lang.Object
Field Summary |
static long |
TICK_LENGTH
The default length of a tick. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TICK_LENGTH
public static final long TICK_LENGTH
- The default length of a tick.
- See Also:
- Constant Field Values
BandwidthManager
public BandwidthManager()
addBandwidthListener
public void addBandwidthListener()
allocate
public boolean allocate(BandwidthManagable transfer)
throws java.lang.InterruptedException
- Returns true, if bandwidth was allocated.
- Throws:
java.lang.InterruptedException
consume
public void consume(int weight,
boolean external)
setBandwidth
public void setBandwidth(long newValue)
Copyright © 2001-2005 XNap Team. All Rights Reserved.