pl.allegro.tech.hermes.management.domain.retransmit.DcAwareOfflineRetransmissionRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-management Show documentation
Show all versions of hermes-management Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.management.domain.retransmit;
import java.util.List;
import pl.allegro.tech.hermes.api.OfflineRetransmissionTask;
import pl.allegro.tech.hermes.management.domain.dc.MultiDatacenterRepositoryCommandExecutor;
public class DcAwareOfflineRetransmissionRepository implements OfflineRetransmissionRepository {
private final MultiDatacenterRepositoryCommandExecutor commandExecutor;
private final OfflineRetransmissionRepository offlineRetransmissionRepository;
public DcAwareOfflineRetransmissionRepository(
MultiDatacenterRepositoryCommandExecutor commandExecutor,
OfflineRetransmissionRepository offlineRetransmissionRepository) {
this.commandExecutor = commandExecutor;
this.offlineRetransmissionRepository = offlineRetransmissionRepository;
}
@Override
public void saveTask(OfflineRetransmissionTask task) {
commandExecutor.execute(new CreateOfflineRetransmissionTaskCommand(task));
}
@Override
public List getAllTasks() {
return offlineRetransmissionRepository.getAllTasks();
}
@Override
public void deleteTask(String taskId) {
commandExecutor.execute(new DeleteOfflineRetransmissionTaskCommand(taskId));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy