blob: b3b6718a7bcd96110d428a0c0a5686d7cb9137b2 (
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
|
// 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;
/**
* @author hakonhall
*/
public class ZooKeeperPaths {
private final String root;
private final int nodeIndex;
public ZooKeeperPaths(String clusterName, int nodeIndex) {
this.root = "/vespa/fleetcontroller/" + clusterName;
this.nodeIndex = nodeIndex;
}
public String root() { return root; }
public String indexesRoot() { return root + "/indexes"; }
public String indexesOf(int index) { return indexesRoot() + "/" + index; }
public String indexesOfMe() { return indexesOf(nodeIndex); }
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"; }
}
|