Package org.nuxeo.runtime.migration
Class MigrationServiceImpl.InvalidatorMigrator
java.lang.Object
org.nuxeo.runtime.migration.MigrationServiceImpl.InvalidatorMigrator
- All Implemented Interfaces:
MigrationService.Migrator
- Enclosing class:
MigrationServiceImpl
public static class MigrationServiceImpl.InvalidatorMigrator
extends Object
implements MigrationService.Migrator
A
migrator wrapper to send invalidations to other nodes when calling
notifyStatusChange().- Since:
- 10.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final MigrationServiceImpl.MigrationInvalidatorprotected final MigrationService.Migrator -
Constructor Summary
ConstructorsConstructorDescriptionInvalidatorMigrator(String id, MigrationService.Migrator migrator, MigrationServiceImpl.MigrationInvalidator invalidator) -
Method Summary
Modifier and TypeMethodDescriptionvoidAllows notification of status change for a running step or new state.Probes the current state of a migration by analyzing persistent data.voidrun(String step, MigrationService.MigrationContext migrationContext) Runs a migration step.
-
Field Details
-
id
-
migrator
-
invalidator
-
-
Constructor Details
-
InvalidatorMigrator
public InvalidatorMigrator(String id, MigrationService.Migrator migrator, MigrationServiceImpl.MigrationInvalidator invalidator)
-
-
Method Details
-
getMigrator
- Since:
- 2023.0
-
probeState
Description copied from interface:MigrationService.MigratorProbes the current state of a migration by analyzing persistent data.Assumes no migration step is currently running.
THIS METHOD MAY TAKE A WHILE as it needs to get information from persistent storage.
- Specified by:
probeStatein interfaceMigrationService.Migrator- Returns:
- the probed state, or
nullif it cannot be determined
-
run
Description copied from interface:MigrationService.MigratorRuns a migration step.This method should periodically check for
MigrationService.MigrationContext.isShutdownRequested()andThread.isInterrupted()and return iftrue.- Specified by:
runin interfaceMigrationService.Migrator- Parameters:
step- the migration step to runmigrationContext- the migration context.
-
notifyStatusChange
public void notifyStatusChange()Description copied from interface:MigrationService.MigratorAllows notification of status change for a running step or new state.- Specified by:
notifyStatusChangein interfaceMigrationService.Migrator
-