class ConfigReloadAutoConfiguration {

	@Bean("springCloudKubernetesTaskScheduler")
	@ConditionalOnMissingBean
	public TaskSchedulerWrapper<TaskScheduler> taskScheduler() {
		ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();

		threadPoolTaskScheduler.setThreadNamePrefix("spring-cloud-kubernetes-ThreadPoolTaskScheduler-");
		threadPoolTaskScheduler.setDaemon(true);

		return new TaskSchedulerWrapper<>(threadPoolTaskScheduler);
	}

	@Bean
	@ConditionalOnMissingBean
	public ConfigurationUpdateStrategy configurationUpdateStrategy(ConfigReloadProperties properties,
			ConfigurableApplicationContext ctx, Optional<RestartEndpoint> restarter, ContextRefresher refresher) {<FILL_FUNCTION_BODY>}

	private static void wait(ConfigReloadProperties properties) {
		long waitMillis = ThreadLocalRandom.current().nextLong(properties.maxWaitForRestart().toMillis());
		try {
			Thread.sleep(waitMillis);
		}
		catch (InterruptedException ignored) {
			Thread.currentThread().interrupt();
		}
	}

}

		String strategyName = properties.strategy().name();
		return switch (properties.strategy()) {
			case RESTART_CONTEXT -> {
				restarter.orElseThrow(() -> new AssertionError("Restart endpoint is not enabled"));
				yield new ConfigurationUpdateStrategy(strategyName, () -> {
					wait(properties);
					restarter.get().restart();
				});
			}
			case REFRESH -> new ConfigurationUpdateStrategy(strategyName, refresher::refresh);
			case SHUTDOWN -> new ConfigurationUpdateStrategy(strategyName, () -> {
				wait(properties);
				ctx.close();
			});
		};
	
<no_super_class>