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
Amigratorwrapper to send invalidations to other nodes when callingnotifyStatusChange().- Since:
- 10.10
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringidprotected MigrationServiceImpl.MigrationInvalidatorinvalidatorprotected MigrationService.Migratormigrator
-
Constructor Summary
Constructors Constructor Description InvalidatorMigrator(String id, MigrationService.Migrator migrator, MigrationServiceImpl.MigrationInvalidator invalidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MigrationService.MigratorgetMigrator()voidnotifyStatusChange()Allows notification of status change for a running step or new state.StringprobeState()Probes the current state of a migration by analyzing persistent data.voidrun(String step, MigrationService.MigrationContext migrationContext)Runs a migration step.
-
-
-
Field Detail
-
id
protected final String id
-
migrator
protected final MigrationService.Migrator migrator
-
invalidator
protected final MigrationServiceImpl.MigrationInvalidator invalidator
-
-
Constructor Detail
-
InvalidatorMigrator
public InvalidatorMigrator(String id, MigrationService.Migrator migrator, MigrationServiceImpl.MigrationInvalidator invalidator)
-
-
Method Detail
-
getMigrator
public MigrationService.Migrator getMigrator()
- Since:
- 2023.0
-
probeState
public String 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
public void run(String step, MigrationService.MigrationContext migrationContext)
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
-
-