Interface IdbMigrationStrategy

All Known Implementing Classes:
ExtensionPointCleanupStrategy, ExtensionPointRecordMigrationStrategy, IncomingConnectionMigrationStrategy, NamedRecordMigrationStrategy, NoOpMigrationStrategy, ProxyRulesMigrationStrategy, QueueSettingsMigrationStrategy, SingletonRecordMigrationStrategy, StoreAndForwardMigrationStrategy

public interface IdbMigrationStrategy
A strategy that migrates records from one or more records or tables in the internal database to the configuration resource collection.
  • Field Details

    • MIGRATION_ACTOR

      static final String MIGRATION_ACTOR
      The "actor" field to use in when setting the LastModification for migrated resources
      See Also:
  • Method Details

    • migrate

      Migrate records from the internal database to the configuration resource collection. To do this, use the given session to issue an SQuery to find the records you want to migrate. Then compile a list of ChangeOperation that will be applied to the config resource collection to add the appropriate resources.
      Parameters:
      context - a MigrationContext which provides methods for accessing a PersistenceSession to query the internal DB as well as a ConfigurationManager for accessing the new config resource APIs
      Returns:
      A list of change operations that will be applied to the config resource collection.
      Throws:
      MigrationException - If an error occurs during migration.
    • getTableNames

      default List<String> getTableNames()
      The names of the IdB tables whose un-migrated presence should trigger the execution of this migration strategy. Default implementation will derive the table names from getRecordMetas(), but can be overridden if this strategy is not record-based.
    • getRecordMetas

      List<SRecordMeta<? extends SRecordInstance>> getRecordMetas()
      Returns:
      The record metas that this strategy migrates, if any. If this strategy does not migrate records, return an empty list. Also note that any record metas returned here will automatically be applied to the SchemaUpdater.updatePersistentRecords(Iterable), so you do not need to do this again in your GatewayModuleHook setup() method.