public void freeTopology(String topId, Cluster cluster) {
        Set<WorkerSlot> slots = _topIdToUsedSlots.get(topId);
        if (slots == null || slots.isEmpty())
            return;
        for (WorkerSlot ws : slots) {
            cluster.freeSlot(ws);
            if (_isAlive) {
                _freeSlots.add(ws);
            }
        }
        _topIdToUsedSlots.remove(topId);
    }
public void freeTopology ( String topId , Cluster cluster ) { Set < WorkerSlot > slots = _topIdToUsedSlots . get ( topId ) ; if ( slots == null || slots . isEmpty ( ) ) return ; for ( WorkerSlot ws : slots ) { cluster . freeSlot ( ws ) ; if ( _isAlive ) { _freeSlots . add ( ws ) ; } } _topIdToUsedSlots . remove ( topId ) ; }
Frees all the slots for a topology.

@param topId   the topology to free slots for
@param cluster the cluster to update