// Path: src/main/java/com/github/kindrat/cassandra/client/service/BackgroundTaskExecutor.java
// public class BackgroundTaskExecutor {
//     private final Map<UUID, BackgroundTask> runningTasks = new HashMap<>();
// 
//     public UUID submit(BackgroundTask task) {
//         UUID taskId = UUID.randomUUID();
//         runningTasks.put(taskId, task);
//         task.run();
//         return taskId;
//     }
// 
//     public Optional<TaskStatistics> findTaskStatistics(UUID taskId) {
//         return Optional.ofNullable(runningTasks.get(taskId)).map(BackgroundTask::getStatistics);
//     }
// 
//     @SneakyThrows
//     public void stop(UUID taskId) {
//         BackgroundTask task = runningTasks.remove(taskId);
//         if (task != null) {
//             task.dispose();
//             while(!task.isDisposed()) {
//                 Thread.sleep(100);
//             }
//         }
//     }
// }


import com.github.kindrat.cassandra.client.service.BackgroundTaskExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
package com.github.kindrat.cassandra.client.configuration;


@Configuration
public class ApplicationConfiguration {

// Path: src/main/java/com/github/kindrat/cassandra/client/service/BackgroundTaskExecutor.java
// public class BackgroundTaskExecutor {
//     private final Map<UUID, BackgroundTask> runningTasks = new HashMap<>();
// 
//     public UUID submit(BackgroundTask task) {
//         UUID taskId = UUID.randomUUID();
//         runningTasks.put(taskId, task);
//         task.run();
//         return taskId;
//     }
// 
//     public Optional<TaskStatistics> findTaskStatistics(UUID taskId) {
//         return Optional.ofNullable(runningTasks.get(taskId)).map(BackgroundTask::getStatistics);
//     }
// 
//     @SneakyThrows
//     public void stop(UUID taskId) {
//         BackgroundTask task = runningTasks.remove(taskId);
//         if (task != null) {
//             task.dispose();
//             while(!task.isDisposed()) {
//                 Thread.sleep(100);
//             }
//         }
//     }
// }


// Path: src/main/java/com/github/kindrat/cassandra/client/configuration/ApplicationConfiguration.java
import com.github.kindrat.cassandra.client.service.BackgroundTaskExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

package com.github.kindrat.cassandra.client.configuration;


@Configuration
public class ApplicationConfiguration {

    @Bean