Package org.nuxeo.runtime.migration
Interface MigrationService.Migrator
-
- All Known Implementing Classes:
AbstractRepositoryMigrator
,CommentsMigrator
,MigrationServiceImpl.InvalidatorMigrator
,TagsMigrator
,TrashedStateMigrator
- Enclosing interface:
- MigrationService
public static interface MigrationService.Migrator
Interface for the implementation of a migrator.- Since:
- 9.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
notifyStatusChange()
Allows notification of status change for a running step or new state.default String
probeState()
Probes the current state of a migration by analyzing persistent data.void
run(String step, MigrationService.MigrationContext migrationContext)
Runs a migration step.
-
-
-
Method Detail
-
probeState
default String probeState()
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.
- Returns:
- the probed state, or
null
if it cannot be determined - Since:
- 10.3
-
run
void run(String step, MigrationService.MigrationContext migrationContext)
Runs a migration step.This method should periodically check for
MigrationService.MigrationContext.isShutdownRequested()
andThread.isInterrupted()
and return iftrue
.- Parameters:
step
- the migration step to runmigrationContext
- the migration context.
-
notifyStatusChange
void notifyStatusChange()
Allows notification of status change for a running step or new state.- Since:
- 10.3
-
-