diff --git a/arcCommon/src/main/java/org/threadly/db/aurora/AuroraClusterMonitor.java b/arcCommon/src/main/java/org/threadly/db/aurora/AuroraClusterMonitor.java index aad4542..4374f55 100644 --- a/arcCommon/src/main/java/org/threadly/db/aurora/AuroraClusterMonitor.java +++ b/arcCommon/src/main/java/org/threadly/db/aurora/AuroraClusterMonitor.java @@ -94,7 +94,7 @@ public static void setExceptionHandler(BiConsumer handl } /** - * Invoke to set the weight for a given replica. This only impacts when a random replica is + * Invoke to set the weight for a given server. This only impacts when a random replica is * requested, and wont impact the master server usage. The weight must be between {@code 0} and * {@code 100} inclusive. Ever server starts with a default weight of {@code 1}. A weight of * {@code 0} indicates to not use the replica unless no other healthy replicas are available. @@ -106,7 +106,7 @@ public static void setExceptionHandler(BiConsumer handl * @param port The port for the replica server * @param weight The weight to apply to this replica */ - public static void setReplicaWeight(String host, int port, int weight) { + public static void setHostWeight(String host, int port, int weight) { if (weight < 0) { throw new IllegalArgumentException("Negative server weights not allowed"); } else if (weight > 100) { diff --git a/arcCommon/src/test/java/org/threadly/db/aurora/AuroraClusterMonitorTest.java b/arcCommon/src/test/java/org/threadly/db/aurora/AuroraClusterMonitorTest.java index 40c3b41..bacb095 100644 --- a/arcCommon/src/test/java/org/threadly/db/aurora/AuroraClusterMonitorTest.java +++ b/arcCommon/src/test/java/org/threadly/db/aurora/AuroraClusterMonitorTest.java @@ -13,13 +13,13 @@ public void setServerCheckDelayMillisFail() { @Test (expected = IllegalArgumentException.class) public void setReplicaWeightNegativeFail() { - AuroraClusterMonitor.setReplicaWeight("host", 3360, -1); + AuroraClusterMonitor.setHostWeight("host", 3360, -1); fail("Exception expected"); } @Test (expected = IllegalArgumentException.class) public void setReplicaWeightMaxFail() { - AuroraClusterMonitor.setReplicaWeight("host", 3360, 101); + AuroraClusterMonitor.setHostWeight("host", 3360, 101); fail("Exception expected"); } }