code: public void freeAllSlots(Cluster cluster) {
          if (!_isAlive) {
              LOG.warn("Freeing all slots on a dead node {} ", _nodeId);
          }
          for (Entry<String, Set<WorkerSlot>> entry : _topIdToUsedSlots.entrySet()) {
              cluster.freeSlots(entry.getValue());
              if (_isAlive) {
                  _freeSlots.addAll(entry.getValue());
              }
          }
          _topIdToUsedSlots = new HashMap<>();
      }
docs: Free all slots on this node. This will update the Cluster too.
  
  @param cluster the cluster to be updated