All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.management.domain.retransmit.DeleteOfflineRetransmissionTaskCommand Maven / Gradle / Ivy

There is a newer version: 2.8.0
Show newest version
package pl.allegro.tech.hermes.management.domain.retransmit;

import pl.allegro.tech.hermes.management.domain.dc.DatacenterBoundRepositoryHolder;
import pl.allegro.tech.hermes.management.domain.dc.RepositoryCommand;

class DeleteOfflineRetransmissionTaskCommand
    extends RepositoryCommand {
  private final String taskId;

  DeleteOfflineRetransmissionTaskCommand(String taskId) {
    this.taskId = taskId;
  }

  @Override
  public void backup(DatacenterBoundRepositoryHolder holder) {}

  @Override
  public void execute(DatacenterBoundRepositoryHolder holder) {
    holder.getRepository().deleteTask(taskId);
  }

  @Override
  public void rollback(
      DatacenterBoundRepositoryHolder holder,
      Exception exception) {}

  @Override
  public Class getRepositoryType() {
    return OfflineRetransmissionRepository.class;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy