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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The "actor" field to use in when setting the LastModification for migrated resources -
Method Summary
Modifier and TypeMethodDescriptionList<SRecordMeta<? extends SRecordInstance>>
The names of the IdB tables whose un-migrated presence should trigger the execution of this migration strategy.migrate
(MigrationContext context) Migrate records from the internal database to the configuration resource collection.
-
Field Details
-
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 anSQuery
to find the records you want to migrate. Then compile a list ofChangeOperation
that will be applied to the config resource collection to add the appropriate resources.- Parameters:
context
- aMigrationContext
which provides methods for accessing aPersistenceSession
to query the internal DB as well as aConfigurationManager
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
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 fromgetRecordMetas()
, 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 yourGatewayModuleHook
setup() method.
-