Class NoOpMigrationStrategy
java.lang.Object
com.inductiveautomation.ignition.gateway.config.migration.NoOpMigrationStrategy
- All Implemented Interfaces:
IdbMigrationStrategy
A no-operation implementation of
IdbMigrationStrategy
.
This strategy does not perform any migration logic. It is typically used for tables that do not require migration or for placeholder purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.config.migration.IdbMigrationStrategy
IdbMigrationStrategy.MigrationResult
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.gateway.config.migration.IdbMigrationStrategy
MIGRATION_ACTOR
-
Constructor Summary
ConstructorsConstructorDescriptionNoOpMigrationStrategy
(List<SRecordMeta<? extends SRecordInstance>> recordMetas) Constructs aNoOpMigrationStrategy
instance for the provided list of record metadata.NoOpMigrationStrategy
(SRecordMeta<? extends SRecordInstance> recordMeta) Constructs aNoOpMigrationStrategy
instance for a single record metadata. -
Method Summary
Modifier and TypeMethodDescriptionList<SRecordMeta<? extends SRecordInstance>>
migrate
(MigrationContext ignored) Migrate records from the internal database to the configuration resource collection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.gateway.config.migration.IdbMigrationStrategy
getTableNames
-
Constructor Details
-
NoOpMigrationStrategy
Constructs aNoOpMigrationStrategy
instance for a single record metadata.- Parameters:
recordMeta
- anSRecordMeta
instance representing the table that will be marked as migrated. Must not be null.- Throws:
NullPointerException
- if recordMeta is null.
-
NoOpMigrationStrategy
Constructs aNoOpMigrationStrategy
instance for the provided list of record metadata. This strategy does not perform any actual database migration and is typically used for marking tables as migrated without any operational changes.- Parameters:
recordMetas
- a list ofSRecordMeta
instances representing the tables to be considered as migrated. The list must not be null and must not contain null elements.- Throws:
NullPointerException
- if the recordMetas argument or any of its elements are null.
-
-
Method Details
-
migrate
Description copied from interface:IdbMigrationStrategy
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.- Specified by:
migrate
in interfaceIdbMigrationStrategy
- Parameters:
ignored
- 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.
-
getRecordMetas
- Specified by:
getRecordMetas
in interfaceIdbMigrationStrategy
- 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.
-