diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-02-18 17:58:46 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-02-18 17:58:46 +0100 |
commit | 79d9ae7cc3eb7052cce5e40ea83874d312cf5012 (patch) | |
tree | 965cd6af495fc5cf12193fc20ef032f2ea222126 /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications | |
parent | b6416d4e35daf38d15e038c0ac3d47b84ff38436 (diff) |
Better names
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Status.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Status.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Status.java index 7871c5f7ed2..ace05d85bbd 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Status.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Status.java @@ -10,40 +10,40 @@ import java.util.Objects; */ public class Status { - private final double currentTrafficFraction; - private final double maxTrafficFraction; + private final double currentReadShare; + private final double maxReadShare; /** Do not use */ - public Status(double currentTrafficFraction, double maxTrafficFraction) { - this.currentTrafficFraction = currentTrafficFraction; - this.maxTrafficFraction = maxTrafficFraction; + public Status(double currentReadShare, double maxReadShare) { + this.currentReadShare = currentReadShare; + this.maxReadShare = maxReadShare; } - public Status withCurrentTrafficFraction(double currentTrafficFraction) { - return new Status(currentTrafficFraction, maxTrafficFraction); + public Status withCurrentReadShare(double currentReadShare) { + return new Status(currentReadShare, maxReadShare); } /** * Returns the current fraction of the global traffic to this application that is received by the * deployment in this zone. */ - public double currentTrafficFraction() { return currentTrafficFraction; } + public double currentReadShare() { return currentReadShare; } - public Status withMaxTrafficFraction(double maxTrafficFraction) { - return new Status(currentTrafficFraction, maxTrafficFraction); + public Status withMaxReadShare(double maxReadShare) { + return new Status(currentReadShare, maxReadShare); } /** * Returns an estimate of the max fraction of the global traffic to this application that may possibly * be received by the deployment in this zone. */ - public double maxTrafficFraction() { return maxTrafficFraction; } + public double maxReadShare() { return maxReadShare; } public static Status initial() { return new Status(0, 0); } @Override public int hashCode() { - return Objects.hash(currentTrafficFraction, maxTrafficFraction); + return Objects.hash(currentReadShare, maxReadShare); } @Override @@ -51,16 +51,16 @@ public class Status { if (o == this) return true; if ( ! (o instanceof Status)) return false; Status other = (Status)o; - if ( other.currentTrafficFraction != this.currentTrafficFraction) return false; - if ( other.maxTrafficFraction != this.maxTrafficFraction) return false; + if ( other.currentReadShare != this.currentReadShare) return false; + if ( other.maxReadShare != this.maxReadShare) return false; return true; } @Override public String toString() { return "application status: [" + - "currentTrafficFraction: " + currentTrafficFraction + ", " + - "maxTrafficFraction: " + maxTrafficFraction + + "currentReadShare: " + currentReadShare + ", " + + "maxReadShare: " + maxReadShare + "]"; } |