code: public void registerPartition(ResultPartitionID partitionId) {
  		checkNotNull(partitionId);
  
  		synchronized (registeredHandlers) {
  			LOG.debug("registering {}", partitionId);
  			if (registeredHandlers.put(partitionId, new TaskEventHandler()) != null) {
  				throw new IllegalStateException(
  					"Partition " + partitionId + " already registered at task event dispatcher.");
  			}
  		}
  	}
docs: Registers the given partition for incoming task events allowing calls to {@link
  #subscribeToEvent(ResultPartitionID, EventListener, Class)}.
  
  @param partitionId
  the partition ID