Class BandwidthDivider
java.lang.Object
|
+--BandwidthDivider
- public class BandwidthDivider
- extends java.lang.Object
This class contains a static method to devide up an upper bandwidth
limit between multiple clients.
- Version:
- 1.0
- Author:
- Thomas Dreibholz (Dreibholz@bigfoot.com)
Method Summary |
long |
divideUp(long available,
TransportInfo[] transportInfo,
long[][] bandwidth,
int count)
Divide up an upper bandwidth limit. |
static long |
min(long a,
long b)
Get minimum of a and b: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BandwidthDivider
public BandwidthDivider()
min
public static long min(long a,
long b)
- Get minimum of a and b:
- Parameters:
a
- Value 1.b
- Value 2.- Returns:
- Minimum of a and b.
divideUp
public long divideUp(long available,
TransportInfo[] transportInfo,
long[][] bandwidth,
int count)
- Divide up an upper bandwidth limit.
- Parameters:
available
- Available bandwidth to be divided up.transportInfo
- Array of TransportInfos.bandwidth
- Array [ClientNum][LayerNum] to store calculated bandwidths for TransportInfos.count
- Number of array entries.- Returns:
- Rest bandwidth.