From 7e39d82e3b71d1957fb40edb6958dee4f2751d24 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 15 Nov 2021 20:04:51 +0100 Subject: Minor formatting changes and rename a method, no functional changes --- .../vespa/config/server/filedistribution/FileServer.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'configserver') 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 configServers, Supervisor supervisor) { + private static ConnectionPool createConnectionPool(List configServers, Supervisor supervisor) { return configServers.size() > 0 ? new JRTConnectionPool(new ConfigSourceSet(configServers), supervisor) : FileDownloader.emptyConnectionPool(); -- cgit v1.2.3