lbg.common.net
Class BitTorrentLeechersSetDownloadTime
java.lang.Object
lbg.common.net.BitTorrentLeechersSetDownloadTime
public class BitTorrentLeechersSetDownloadTime
- extends java.lang.Object
- Author:
- Cyril Briquet
Field Summary |
static double |
ALPHA_BT
Latency of the BitTorrent protocol (in seconds). |
static double |
BETA_SENDER
Available bandwidth (in megabytes / seconds) of the initial seeder. |
Method Summary |
static void |
main(java.lang.String[] args)
|
double |
myPredict(double s,
int n)
Predicts the average download time of target file
by the target leechers set using the BitTorrent protocol. |
double |
predict(double s,
int n,
double alpha,
double beta)
Predicts the average download time of target file
by the target leechers set using the BitTorrent protocol. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ALPHA_BT
public static final double ALPHA_BT
- Latency of the BitTorrent protocol (in seconds).
- See Also:
- Constant Field Values
BETA_SENDER
public static final double BETA_SENDER
- Available bandwidth (in megabytes / seconds) of the initial seeder.
- See Also:
- Constant Field Values
BitTorrentLeechersSetDownloadTime
public BitTorrentLeechersSetDownloadTime()
throws GridException
- Throws:
GridException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
myPredict
public double myPredict(double s,
int n)
throws GridException
- Predicts the average download time of target file
by the target leechers set using the BitTorrent protocol.
WARNING: experimental parameters, use with great caution.
- Parameters:
s
- target file size (in megabytes)n
- number of leechers
- Returns:
- predicted download time using BitTorrent
- Throws:
GridException
predict
public double predict(double s,
int n,
double alpha,
double beta)
throws GridException
- Predicts the average download time of target file
by the target leechers set using the BitTorrent protocol.
- Parameters:
s
- target file size (in megabytes)n
- number of leechersalpha
- Latency of the BitTorrent protocol (in seconds).beta
- Available bandwidth (in megabytes / seconds)
of the initial seeder.
- Returns:
- predicted download time using BitTorrent
- Throws:
GridException
main
public static void main(java.lang.String[] args)
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.