blob: f70f451d33d60110bd50a901bf48ec17098145a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.component;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
* @author freva
*/
public class PathResolver {
public static final Path ROOT = Paths.get("/");
public static final Path RELATIVE_APPLICATION_STORAGE_PATH = Paths.get("home/docker/container-storage");
private final Path applicationStoragePathForNodeAdmin;
private final Path applicationStoragePathForHost;
public PathResolver() {
this(
Paths.get("/host").resolve(RELATIVE_APPLICATION_STORAGE_PATH),
ROOT.resolve(RELATIVE_APPLICATION_STORAGE_PATH));
}
public PathResolver(Path applicationStoragePathForNodeAdmin, Path applicationStoragePathForHost) {
this.applicationStoragePathForNodeAdmin = applicationStoragePathForNodeAdmin;
this.applicationStoragePathForHost = applicationStoragePathForHost;
}
public Path getApplicationStoragePathForNodeAdmin() {
return applicationStoragePathForNodeAdmin;
}
public Path getApplicationStoragePathForHost() {
return applicationStoragePathForHost;
}
}
|