public class TrashedStateMigrator extends AbstractRepositoryMigrator
AbstractRepositoryMigrator.MigrationShutdownException| Modifier and Type | Field and Description |
|---|---|
protected static int |
BATCH_SIZE |
protected static String |
QUERY_DELETED |
migrationContext| Constructor and Description |
|---|
TrashedStateMigrator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
migrateRepository(String repositoryName) |
protected void |
migrateSession(CoreSession session) |
void |
notifyStatusChange()
Allows notification of status change for a running step or new state.
|
protected String |
probeSession(CoreSession session) |
String |
probeState()
Probes the current state of a migration by analyzing persistent data.
|
void |
run(String step,
MigrationService.MigrationContext migrationContext)
Runs a migration step.
|
checkShutdownRequested, probeRepository, processBatched, reportProgress, reportProgressprotected static final String QUERY_DELETED
protected static final int BATCH_SIZE
public TrashedStateMigrator()
public void notifyStatusChange()
MigrationService.Migratorpublic String probeState()
MigrationService.MigratorAssumes no migration step is currently running.
THIS METHOD MAY TAKE A WHILE as it needs to get information from persistent storage.
null if it cannot be determinedprotected String probeSession(CoreSession session)
probeSession in class AbstractRepositoryMigratorpublic void run(String step, MigrationService.MigrationContext migrationContext)
MigrationService.Migrator
This method should periodically check for MigrationService.MigrationContext.isShutdownRequested() and
Thread.isInterrupted() and return if true.
step - the migration step to runmigrationContext - the migration context.protected void migrateRepository(String repositoryName)
migrateRepository in class AbstractRepositoryMigratorprotected void migrateSession(CoreSession session)
migrateSession in class AbstractRepositoryMigratorCopyright © 2019 Nuxeo. All rights reserved.