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

pl.allegro.tech.hermes.management.domain.retransmit.RetransmitCommand 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.api.SubscriptionName;
import pl.allegro.tech.hermes.common.admin.AdminTool;
import pl.allegro.tech.hermes.management.domain.dc.DatacenterBoundRepositoryHolder;
import pl.allegro.tech.hermes.management.domain.dc.RepositoryCommand;

public class RetransmitCommand extends RepositoryCommand {

  private final SubscriptionName subscriptionName;

  public RetransmitCommand(SubscriptionName subscriptionName) {
    this.subscriptionName = subscriptionName;
  }

  @Override
  public void backup(DatacenterBoundRepositoryHolder holder) {}

  @Override
  public void execute(DatacenterBoundRepositoryHolder holder) {
    holder.getRepository().retransmit(subscriptionName);
  }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy