Class FileDownloader

  • All Implemented Interfaces:
    AutoCloseable

    public class FileDownloader
    extends Object
    implements AutoCloseable
    Handles downloads of files (file references only for now)
    Author:
    hmusum
    • Field Detail

      • defaultDownloadDirectory

        public static final File defaultDownloadDirectory
    • Constructor Detail

      • FileDownloader

        public FileDownloader​(com.yahoo.vespa.config.ConnectionPool connectionPool,
                              com.yahoo.jrt.Supervisor supervisor)
      • FileDownloader

        public FileDownloader​(com.yahoo.vespa.config.ConnectionPool connectionPool,
                              com.yahoo.jrt.Supervisor supervisor,
                              Duration timeout)
      • FileDownloader

        public FileDownloader​(com.yahoo.vespa.config.ConnectionPool connectionPool,
                              com.yahoo.jrt.Supervisor supervisor,
                              File downloadDirectory,
                              Duration timeout)
      • FileDownloader

        public FileDownloader​(com.yahoo.vespa.config.ConnectionPool connectionPool,
                              com.yahoo.jrt.Supervisor supervisor,
                              File downloadDirectory,
                              Duration timeout,
                              Duration sleepBetweenRetries)
    • Method Detail

      • downloadStatus

        public Map<com.yahoo.config.FileReference,​Double> downloadStatus()
      • connectionPool

        public com.yahoo.vespa.config.ConnectionPool connectionPool()
      • downloadIfNeeded

        public void downloadIfNeeded​(FileReferenceDownload fileReferenceDownload)
        Start a download if needed, don't wait for result
      • emptyConnectionPool

        public static com.yahoo.vespa.config.ConnectionPool emptyConnectionPool()