Skip to content

Commit

Permalink
Change naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jekka001 committed Dec 4, 2024
1 parent 6ac7fce commit 69f1530
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.thingsboard.server.common.data.id.TenantId;

public interface MigrateService {
public interface CloudEventMigrationService {

boolean isMigrated();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class CloudManagerService {
private ConfigurableApplicationContext context;

@Autowired(required = false)
private MigrateService migrateService;
private CloudEventMigrationService cloudEventMigrationService;

private EdgeSettings currentEdgeSettings;

Expand Down Expand Up @@ -300,8 +300,8 @@ private void initAndUpdateEdgeSettings(EdgeConfiguration edgeConfiguration) thro

initialized = true;

if (migrateService != null && !migrateService.isMigrated()) {
migrateService.migrateUnprocessedEventToKafka(tenantId);
if (cloudEventMigrationService != null && !cloudEventMigrationService.isMigrated()) {
cloudEventMigrationService.migrateUnprocessedEventToKafka(tenantId);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@Slf4j
@Service
@ConditionalOnExpression("'${queue.type:null}'=='kafka'")
public class KafkaMigrateService implements MigrateService {
public class KafkaCloudEventMigrationService implements CloudEventMigrationService {
private final TbCloudEventProvider tbCloudEventProvider;
private final CloudEventDao cloudEventDao;
private final TsKvCloudEventDao tsKvCloudEventDao;
Expand All @@ -65,9 +65,9 @@ public class KafkaMigrateService implements MigrateService {
@Getter
private boolean isMigrated = false;

public KafkaMigrateService(TbCloudEventProvider tbCloudEventProvider, CloudEventDao cloudEventDao,
TsKvCloudEventDao tsKvCloudEventDao, AttributesService attributesService,
DbCallbackExecutorService dbCallbackExecutorService) {
public KafkaCloudEventMigrationService(TbCloudEventProvider tbCloudEventProvider, CloudEventDao cloudEventDao,
TsKvCloudEventDao tsKvCloudEventDao, AttributesService attributesService,
DbCallbackExecutorService dbCallbackExecutorService) {
this.tbCloudEventProvider = tbCloudEventProvider;
this.cloudEventDao = cloudEventDao;
this.tsKvCloudEventDao = tsKvCloudEventDao;
Expand Down

0 comments on commit 69f1530

Please sign in to comment.