public class CommentsMigrator extends AbstractRepositoryMigrator
AbstractRepositoryMigrator.MigrationShutdownException| Modifier and Type | Field and Description |
|---|---|
protected static int |
BATCH_SIZE |
migrationContext| Constructor and Description |
|---|
CommentsMigrator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
migrateComments(CoreSession session,
RelationManager relationManager,
CommentServiceConfig config,
Statement statement) |
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, migrateRepository, probeRepository, processBatched, reportProgress, reportProgressprotected static final int BATCH_SIZE
public CommentsMigrator()
protected String probeSession(CoreSession session)
probeSession in class AbstractRepositoryMigratorprotected void migrateSession(CoreSession session)
migrateSession in class AbstractRepositoryMigratorpublic 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 determinedpublic 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 migrateComments(CoreSession session, RelationManager relationManager, CommentServiceConfig config, Statement statement)
public void notifyStatusChange()
MigrationService.MigratorCopyright © 2019 Nuxeo. All rights reserved.