aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java
new file mode 100644
index 00000000000..06a9b240175
--- /dev/null
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/ZooKeeperPaths.java
@@ -0,0 +1,26 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.clustercontroller.core.database;
+
+import com.yahoo.vespa.clustercontroller.core.FleetControllerId;
+
+/**
+ * @author hakonhall
+ */
+public class ZooKeeperPaths {
+ private final String root;
+ private final int myIndex;
+
+ public ZooKeeperPaths(FleetControllerId id) {
+ this.root = "/vespa/fleetcontroller/" + id.clusterName();
+ this.myIndex = id.index();
+ }
+
+ public String root() { return root; }
+ public String indexesRoot() { return root + "/indexes"; }
+ public String indexOf(int index) { return indexesRoot() + "/" + index; }
+ public String indexOfMe() { return indexOf(myIndex); }
+ public String wantedStates() { return root + "/wantedstates"; }
+ public String publishedStateBundle() { return root + "/published_state_bundle"; }
+ public String latestVersion() { return root + "/latestversion"; }
+ public String startTimestamps() { return root + "/starttimestamps"; }
+}