diff options
Diffstat (limited to 'clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java')
-rw-r--r-- | clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java index 1a0fe6cdf8e..ed5af93d7fb 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/Id.java @@ -52,4 +52,16 @@ public class Id { public String toString() { return super.toString() + "/" + id; } } + public static class Partition extends Node { + private final int id; + + public Partition(Node n, int partition) { + super(n, n.id); + this.id = partition; + } + + public final int getPartitionIndex() { return id; } + public String toString() { return super.toString() + "/" + id; } + } + } |