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
Modifier and TypeFieldDescriptionprotected final String
protected final MigrationServiceImpl.MigrationInvalidator
protected final MigrationService.Migrator
-
Constructor Summary
ConstructorDescriptionInvalidatorMigrator
(String id, MigrationService.Migrator migrator, MigrationServiceImpl.MigrationInvalidator invalidator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Allows notification of status change for a running step or new state.Probes the current state of a migration by analyzing persistent data.void
run
(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.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
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
-