|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lastbamboo.common.download.SourceRankerImpl
public class SourceRankerImpl
Class that ranks available download sources. This will provide callers with the best available source for downloading the next chunk.
| Constructor Summary | |
|---|---|
SourceRankerImpl(Comparator<RangeDownloader> comparator)
Creates a new ranker. |
|
| Method Summary | |
|---|---|
RangeDownloader |
getBestSource()
Gets the best available source to download from. |
boolean |
hasMoreSources()
Returns whether or not this ranker has more sources to download from. |
void |
onAvailable(RangeDownloader downloader)
Notifies the ranker that the given source is available for work. |
void |
onFailed()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceRankerImpl(Comparator<RangeDownloader> comparator)
comparator - The comparator to use for judging sources.| Method Detail |
|---|
public boolean hasMoreSources()
SourceRanker
hasMoreSources in interface SourceRankertrue if this ranker has more sources, otherwise
false.public RangeDownloader getBestSource()
SourceRanker
getBestSource in interface SourceRankerpublic void onAvailable(RangeDownloader downloader)
SourceRanker
onAvailable in interface SourceRankerdownloader - The available downloader.public void onFailed()
onFailed in interface SourceRanker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||