diff options
author | gjoranv <gv@verizonmedia.com> | 2020-06-03 14:21:39 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-06-03 15:13:30 +0200 |
commit | 1ebfac33024d1b5b9e23d1d7560142a7feac5cf5 (patch) | |
tree | c2de127f9b060fecb2261692a24dbf7ef62686be /configserver/src | |
parent | cf217ad7a9c99a40389ac52bbf82a4ef24f202ba (diff) |
minor: move private helpers down
Diffstat (limited to 'configserver/src')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionFactory.java | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionFactory.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionFactory.java index aa3eb8cdfc9..40428d9254c 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionFactory.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionFactory.java @@ -177,23 +177,6 @@ public class SessionFactory { } } - private SessionZooKeeperClient createSessionZooKeeperClient(Path sessionPath) { - return new SessionZooKeeperClient(curator, configCurator, sessionPath, serverId, nodeFlavors); - } - - // TODO: move helpers down - private File getAndValidateExistingSessionAppDir(long sessionId) { - File appDir = getSessionAppDir(sessionId); - if (!appDir.exists() || !appDir.isDirectory()) { - throw new IllegalArgumentException("Unable to find correct application directory for session " + sessionId); - } - return appDir; - } - - private File getSessionAppDir(long sessionId) { - return new TenantFileSystemDirs(componentRegistry.getConfigServerDB(), tenant).getUserApplicationDir(sessionId); - } - /** * Returns a new session instance for the given session id. */ @@ -223,4 +206,20 @@ public class SessionFactory { return sessionsPath.append(String.valueOf(sessionId)); } + private SessionZooKeeperClient createSessionZooKeeperClient(Path sessionPath) { + return new SessionZooKeeperClient(curator, configCurator, sessionPath, serverId, nodeFlavors); + } + + private File getAndValidateExistingSessionAppDir(long sessionId) { + File appDir = getSessionAppDir(sessionId); + if (!appDir.exists() || !appDir.isDirectory()) { + throw new IllegalArgumentException("Unable to find correct application directory for session " + sessionId); + } + return appDir; + } + + private File getSessionAppDir(long sessionId) { + return new TenantFileSystemDirs(componentRegistry.getConfigServerDB(), tenant).getUserApplicationDir(sessionId); + } + } |