summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/Redundancy.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/Redundancy.java b/config-model/src/main/java/com/yahoo/vespa/model/content/Redundancy.java
index 706d9a01c82..ba968411393 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/Redundancy.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/Redundancy.java
@@ -29,12 +29,16 @@ public class Redundancy implements StorDistributionConfig.Producer, ProtonConfig
this.totalNodes = totalNodes;
}
+ /** Returns the final redundancy per group */
public int finalRedundancy() { return effectiveFinalRedundancy()/groups; }
+
public int readyCopies() { return effectiveReadyCopies()/groups; }
public int groups() { return groups; }
public int totalNodes() { return totalNodes; }
public int effectiveInitialRedundancy() { return Math.min(totalNodes, initialRedundancy * groups); }
+
+ /** Returns the final redundancy over all groups */
public int effectiveFinalRedundancy() { return Math.min(totalNodes, finalRedundancy * groups); }
public int effectiveReadyCopies() { return Math.min(totalNodes, readyCopies * groups); }