class MapJobRegistry implements JobRegistry {

	/**
	 * The map holding the registered job factories.
	 */
	// The "final" ensures that it is visible and initialized when the constructor
	// resolves.
	private final ConcurrentMap<String, JobFactory> map = new ConcurrentHashMap<>();

	@Override
	public void register(JobFactory jobFactory) throws DuplicateJobException {<FILL_FUNCTION_BODY>}

	@Override
	public void unregister(String name) {
		Assert.notNull(name, "Job configuration must have a name.");
		map.remove(name);
	}

	@Override
	public Job getJob(@Nullable String name) throws NoSuchJobException {
		JobFactory factory = map.get(name);
		if (factory == null) {
			throw new NoSuchJobException("No job configuration with the name [" + name + "] was registered");
		}
		else {
			return factory.createJob();
		}
	}

	/**
	 * Provides an unmodifiable view of the job names.
	 */
	@Override
	public Set<String> getJobNames() {
		return Collections.unmodifiableSet(map.keySet());
	}

}

		Assert.notNull(jobFactory, "jobFactory is null");
		String name = jobFactory.getJobName();
		Assert.notNull(name, "Job configuration must have a name.");
		JobFactory previousValue = map.putIfAbsent(name, jobFactory);
		if (previousValue != null) {
			throw new DuplicateJobException("A job configuration with this name [" + name + "] was already registered");
		}
	
<no_super_class>