code: public void assign(String topId, Collection<ExecutorDetails> executors, Cluster cluster) {
          if (!_isAlive) {
              throw new IllegalStateException("Trying to adding to a dead node " + _nodeId);
          }
          if (_freeSlots.isEmpty()) {
              throw new IllegalStateException("Trying to assign to a full node " + _nodeId);
          }
          if (executors.size() == 0) {
              LOG.warn("Trying to assign nothing from " + topId + " to " + _nodeId + " (Ignored)");
          } else {
              WorkerSlot slot = _freeSlots.iterator().next();
              cluster.assign(slot, topId, executors);
              assignInternal(slot, topId, false);
          }
      }
docs: Assign a free slot on the node to the following topology and executors. This will update the cluster too.
  
  @param topId     the topology to assign a free slot to.
  @param executors the executors to run in that slot.
  @param cluster   the cluster to be updated