Class MigrationExecutor

java.lang.Object
io.apicurio.registry.contracts.rules.MigrationExecutor

public class MigrationExecutor extends Object
  • Constructor Details

  • Method Details

    • execute

      public RuleExecutionResult execute(List<String> allVersions, String fromVersion, String toVersion, Map<String,Object> record, BiFunction<String,String,List<RuleDefinition>> rulesLoader)
      Executes multi-hop migration from fromVersion to toVersion.
      Parameters:
      allVersions - ordered list of all versions for the artifact
      fromVersion - the version of the record being migrated
      toVersion - the target version
      record - the record to transform
      rulesLoader - function that loads migration rules for a given (version, mode) pair
      Returns:
      the result with the transformed record