summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-11-15 20:04:51 +0100
committerHarald Musum <musum@yahooinc.com>2021-11-15 20:04:51 +0100
commit7e39d82e3b71d1957fb40edb6958dee4f2751d24 (patch)
tree86cff8892e3a81ba3ee14a8c4b8534cd7668eebc /configserver
parent460b115fd8cad64536715597ef4fa8af5bd4fe14 (diff)
Minor formatting changes and rename a method, no functional changes
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java16
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();