summaryrefslogtreecommitdiffstats
path: root/application/src
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-09-29 11:03:57 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-09-29 11:03:57 +0200
commit77b683a0d5d02420cfaf3e3a1b08d52dfef144f9 (patch)
tree0c7294d609bcdbf1851fed153df76c907e1d4110 /application/src
parent9192aa0bad75c648ebfe52b3d8fb310b084f076a (diff)
Cleanup
Diffstat (limited to 'application/src')
-rw-r--r--application/src/main/java/com/yahoo/application/Application.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/application/src/main/java/com/yahoo/application/Application.java b/application/src/main/java/com/yahoo/application/Application.java
index 22c3a94bedc..cfcce72487b 100644
--- a/application/src/main/java/com/yahoo/application/Application.java
+++ b/application/src/main/java/com/yahoo/application/Application.java
@@ -44,6 +44,13 @@ import java.util.*;
@Beta
public final class Application implements AutoCloseable {
+ /**
+ * This system property is set to "true" upon creation of an Application.
+ * This is useful for components which are created by dependendy injection which needs to modify
+ * their behavior to function without reliance on any processes outside the JVM.
+ */
+ public static final String vespaLocalProperty = "vespa.local";
+
private final JDisc container;
private final List<ContentCluster> contentClusters;
private final Path path;
@@ -51,7 +58,7 @@ public final class Application implements AutoCloseable {
// For internal use only
Application(Path path, Networking networking, boolean deletePathWhenClosing) {
- System.setProperty("vespa.local", "true");
+ System.setProperty(vespaLocalProperty, "true");
this.path = path;
this.deletePathWhenClosing = deletePathWhenClosing;
contentClusters = ContentCluster.fromPath(path);