code: private long getNewClientId() {
      while (true) {
        long clientId = Math.abs(clientIdsGenerator.nextLong());
        if (!clientsData.containsKey(clientId)) {
          return clientId;
        }
      }
    }
docs: Generates a new client id which is not present in the current set of ids
  for the clients which are subscribed to this server.
  
  @return A newly generated client id