code: protected void reloadNodes() {
  
          Hello hello = HelloParser.parse(disqueConnection.sync().hello());
          Collections.sort(hello.nodes, new Comparator<PrioritizedDisqueNode>() {
              @Override
              public int compare(PrioritizedDisqueNode o1, PrioritizedDisqueNode o2) {
  
                  if (o1.priority == o2.priority) {
                      return o1.disqueNode.getPort() - o2.disqueNode.getPort();
                  }
                  return o1.priority - o2.priority;
              }
          });
          this.nodes.clear();
  
          for (PrioritizedDisqueNode node : hello.nodes) {
              if (isFiltered(node)) {
                  continue;
              }
  
              this.nodes.add(node.disqueNode);
          }
      }
docs: Load/reload cluster nodes and order the nodes by its priority.