class SchedulerNGFactoryFactory {

	static SchedulerNGFactory createSchedulerNGFactory(
			final Configuration configuration,
			final RestartStrategyFactory restartStrategyFactory) {

		final String schedulerName = configuration.getString(JobManagerOptions.SCHEDULER);
		switch (schedulerName) {
			case "legacy":
				return new LegacySchedulerFactory(restartStrategyFactory);

			case "ng":
				return new DefaultSchedulerFactory();

			default:
				throw new IllegalArgumentException(String.format(
					"Illegal value [%s] for config option [%s]",
					schedulerName,
					JobManagerOptions.SCHEDULER.key()));
		}
	}

	private  SchedulerNGFactoryFactory();

}