Skip to content

Commit f06b7d0

Browse files
committed
Remove unused moveNonLocalReplicasToTheEnd method
Fixes compilation warning treated as error in CI build.
1 parent 76329b9 commit f06b7d0

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -310,25 +310,6 @@ public Queue<Node> newQueryPlanRegular(@Nullable Request request, @Nullable Sess
310310
return maybeAddDcFailover(request, plan);
311311
}
312312

313-
/**
314-
* Returns a replica array with local-datacenter replicas first and remote replicas preserved at
315-
* the end.
316-
*/
317-
private static Object[] moveNonLocalReplicasToTheEnd(List<Node> replicas, String localDc) {
318-
Object[] orderedReplicas = new Object[replicas.size()];
319-
int index = 0;
320-
for (Node replica : replicas) {
321-
if (Objects.equals(replica.getDatacenter(), localDc)) {
322-
orderedReplicas[index++] = replica;
323-
}
324-
}
325-
for (Node replica : replicas) {
326-
if (!Objects.equals(replica.getDatacenter(), localDc)) {
327-
orderedReplicas[index++] = replica;
328-
}
329-
}
330-
return orderedReplicas;
331-
}
332313

333314
private int[] moveReplicasToFront(Object[] currentNodes, List<Node> allReplicas) {
334315
int replicaCount = 0, localRackReplicaCount = 0;

0 commit comments

Comments
 (0)