class TaskEventDispatcher {

	public void unregisterPartition(ResultPartitionID partitionId) {
		checkNotNull(partitionId);

		synchronized (registeredHandlers) {
			LOG.debug("unregistering {}", partitionId);
			// NOTE: tolerate un-registration of non-registered task (unregister is always called
			//       in the cleanup phase of a task even if it never came to the registration - see
			//       Task.java)
			registeredHandlers.remove(partitionId);
		}
	}

}