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
Amigrator
wrapper to send invalidations to other nodes when callingnotifyStatusChange()
.- Since:
- 10.10
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
protected MigrationServiceImpl.MigrationInvalidator
invalidator
protected MigrationService.Migrator
migrator
-
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.Migrator
getMigrator()
void
notifyStatusChange()
Allows notification of status change for a running step or new state.String
probeState()
Probes the current state of a migration by analyzing persistent data.void
run(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.Migrator
Probes 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:
probeState
in interfaceMigrationService.Migrator
- Returns:
- the probed state, or
null
if it cannot be determined
-
run
public void run(String step, MigrationService.MigrationContext migrationContext)
Description copied from interface:MigrationService.Migrator
Runs a migration step.This method should periodically check for
MigrationService.MigrationContext.isShutdownRequested()
andThread.isInterrupted()
and return iftrue
.- Specified by:
run
in interfaceMigrationService.Migrator
- Parameters:
step
- the migration step to runmigrationContext
- the migration context.
-
notifyStatusChange
public void notifyStatusChange()
Description copied from interface:MigrationService.Migrator
Allows notification of status change for a running step or new state.- Specified by:
notifyStatusChange
in interfaceMigrationService.Migrator
-
-