blob: 06a9b24017527022a0b9c80acaac8b8ff040bd4e (
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
|
// 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"; }
}
|