|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lastbamboo.common.download.DefaultRangeSizeSelector
public class DefaultRangeSizeSelector
Class for selecting the size of download ranges based on the size of a file and the number of available sources.
| Field Summary | |
|---|---|
static long |
DIFFERENTIAL_SPEED_FACTOR
This is the factor that takes into account that different sources provide different download speeds. |
static long |
MAX_CHUNK_SIZE
The maximum size for chunks. |
static long |
MIN_CHUNK_SIZE
The minimum size for chunks. |
| Constructor Summary | |
|---|---|
DefaultRangeSizeSelector()
|
|
| Method Summary | |
|---|---|
long |
selectSize(long fileSize,
int numSources)
Selects the size of ranges based on the file size and the number of sources for the download. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long MAX_CHUNK_SIZE
public static final long MIN_CHUNK_SIZE
public static final long DIFFERENTIAL_SPEED_FACTOR
| Constructor Detail |
|---|
public DefaultRangeSizeSelector()
| Method Detail |
|---|
public long selectSize(long fileSize,
int numSources)
RangeSizeSelector
selectSize in interface RangeSizeSelectorfileSize - The size of the file.numSources - The number of sources for the download.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||