79 log.debug(
"already initialized. returning...");
86 List<Pair<Q, E>> pairList =
new ArrayList<>(pairSupplier.size());
94 for (; index < pairSupplier.size(); index += step) {
95 pairList.add(pairSupplier.get(index));
98 if (Objects.nonNull(randomnessSeed)) {
99 log.info(
"'randomnessSeed' value is not null. Going to shuffle the pairs");
100 Collections.shuffle(pairList,
new Random(randomnessSeed));
103 log.info(
"{} pairs on this node to balance", pairList.size());
104 log.debug(
"Pairs to load balance: {}", pairList);
106 pairQueue =
new ArrayBlockingQueue<>(pairSupplier.size(),
true, pairList);