docs: @Override
  	public void onEvent(TaskEvent event) {
  		if (event instanceof TerminationEvent) {
  			terminationSignaled = true;
  		}
  		else if (event instanceof AllWorkersDoneEvent) {
  			AllWorkersDoneEvent wde = (AllWorkersDoneEvent) event;
  			aggregatorNames = wde.getAggregatorNames();
  			aggregates = wde.getAggregates(userCodeClassLoader);
  		}
  		else {
  			throw new IllegalArgumentException("Unknown event type.");
  		}
  
  		latch.countDown();
  	}