Interface MigrationService.Migrator

All Known Implementing Classes:
AbstractBulkMigrator, AbstractRepositoryMigrator, BlobKeysBulkMigrator, CommentsMigrator, MigrationServiceImpl.InvalidatorMigrator, TrashedStateMigrator
Enclosing interface:
MigrationService

public static interface MigrationService.Migrator
Interface for the implementation of a migrator.
Since:
9.3
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Allows notification of status change for a running step or new state.
    default String
    Probes the current state of a migration by analyzing persistent data.
    void
    run(String step, MigrationService.MigrationContext migrationContext)
    Runs a migration step.
  • Method Details

    • 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() and Thread.isInterrupted() and return if true.

      Parameters:
      step - the migration step to run
      migrationContext - the migration context.
    • notifyStatusChange

      void notifyStatusChange()
      Allows notification of status change for a running step or new state.
      Since:
      10.3