code: public synchronized boolean acquireRebalancingPermit(int nodeId) {
          boolean added = rebalancePermits.add(nodeId);
          logger.info("Acquiring rebalancing permit for node id " + nodeId + ", returned: " + added);
  
          return added;
      }
docs: Acquire a permit for a particular node id so as to allow rebalancing
  
  @param nodeId The id of the node for which we are acquiring a permit
  @return Returns true if permit acquired, false if the permit is already
  held by someone