use of com.hazelcast.internal.partition.impl.MigrationManager in project hazelcast by hazelcast.
the class BaseMigrationOperation method setActiveMigration.
void setActiveMigration() {
InternalPartitionServiceImpl partitionService = getService();
MigrationManager migrationManager = partitionService.getMigrationManager();
MigrationInfo currentActiveMigration = migrationManager.setActiveMigration(migrationInfo);
if (currentActiveMigration != null) {
throw new RetryableHazelcastException("Cannot set active migration to " + migrationInfo + ". Current active migration is " + currentActiveMigration);
}
PartitionStateManager partitionStateManager = partitionService.getPartitionStateManager();
partitionStateManager.setMigratingFlag(migrationInfo.getPartitionId());
}
Aggregations