diff options
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java index 6f0f128e360..cfc7a88568c 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java @@ -95,10 +95,6 @@ public class FileServer { return hasFile(new FileReference(fileReference)); } - FileDirectory getRootDir() { - return root; - } - private boolean hasFile(FileReference reference) { try { return root.getFile(reference).exists(); @@ -108,6 +104,8 @@ public class FileServer { return false; } + FileDirectory getRootDir() { return root; } + void startFileServing(String fileName, Receiver target) { FileReference reference = new FileReference(fileName); File file = root.getFile(reference); @@ -194,14 +192,12 @@ public class FileServer { FileReferenceDownload newDownload = new FileReferenceDownload(fileReference, false, fileReferenceDownload.client()); return downloader.getFile(newDownload).isPresent(); } else { - log.log(Level.FINE, "File not found, will not download from another source since request came from another config server"); + log.log(Level.FINE, "File not found, will not download from another source, since request came from another config server"); return false; } } - public FileDownloader downloader() { - return downloader; - } + public FileDownloader downloader() { return downloader; } public void close() { downloader.close(); @@ -212,11 +208,11 @@ public class FileServer { Supervisor supervisor = new Supervisor(new Transport("filedistribution-pool")).setDropEmptyBuffers(true); return new FileDownloader(configServers.isEmpty() ? FileDownloader.emptyConnectionPool() - : getConnectionPool(configServers, supervisor), + : createConnectionPool(configServers, supervisor), supervisor); } - private static ConnectionPool getConnectionPool(List<String> configServers, Supervisor supervisor) { + private static ConnectionPool createConnectionPool(List<String> configServers, Supervisor supervisor) { return configServers.size() > 0 ? new JRTConnectionPool(new ConfigSourceSet(configServers), supervisor) : FileDownloader.emptyConnectionPool(); |