public class RetryingDownloader extends Object implements Downloader
Downloader
decorator which adds retry logic to any decorated downloader instance.
TODO(ttsugrii): support flexible backoff strategy (at least exponential).
Modifier and Type | Class and Description |
---|---|
static class |
RetryingDownloader.RetryingDownloaderException |
DEFAULT_NAME
Modifier and Type | Method and Description |
---|---|
boolean |
fetch(BuckEventBus eventBus,
URI uri,
Path output)
Download the given URL and, upon a successful download, place it in
output . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public boolean fetch(BuckEventBus eventBus, URI uri, Path output) throws IOException
Downloader
output
. Note that
if a Downloader
can't handle the URI.scheme
then false
will be
returned.fetch
in interface Downloader
IOException
- Should an exception be thrown when downloading.