summaryrefslogtreecommitdiffstats
path: root/hosted-zone-api/src/main/java/ai/vespa/cloud/Cluster.java
blob: 5db68b9d5b33c12d6a3c5b317cf56dde8ad44bad (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
package ai.vespa.cloud;

import java.util.Collections;
import java.util.List;

/**
 * The properties of a cluster of nodes.
 *
 * @author gjoranv
 */
public class Cluster {

    private final int size;
    private final List<Integer> indices;

    public Cluster(int size, List<Integer> indices) {
        this.size = size;
        this.indices = Collections.unmodifiableList(indices);
    }

    /** Returns the number of nodes in this cluster. */
    public int size() { return size; }

    /** Returns a list of node indices in this cluster. */
    public List<Integer> indices() {
        return indices;
    }

}