public abstract class AbstractRepositoryMigrator extends Object implements MigrationService.Migrator
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractRepositoryMigrator.MigrationShutdownException |
Modifier and Type | Field and Description |
---|---|
protected MigrationService.MigrationContext |
migrationContext |
Constructor and Description |
---|
AbstractRepositoryMigrator() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkShutdownRequested() |
protected void |
migrateRepository(String repositoryName) |
protected abstract void |
migrateSession(CoreSession session) |
protected String |
probeRepository(String repositoryName) |
protected abstract String |
probeSession(CoreSession session) |
protected <T> void |
processBatched(int batchSize,
Collection<T> collection,
Consumer<T> consumer,
String progressMessage)
Runs a consumer on the collection, committing every BATCH_SIZE elements, reporting progress and checking for
shutdown request.
|
protected void |
reportProgress(String message,
long num,
long total) |
protected void |
reportProgress(String repositoryName,
String message,
long num,
long total) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notifyStatusChange, probeState, run
protected MigrationService.MigrationContext migrationContext
public AbstractRepositoryMigrator()
protected String probeRepository(String repositoryName)
protected void checkShutdownRequested()
protected void reportProgress(String message, long num, long total)
protected void reportProgress(String repositoryName, String message, long num, long total)
protected void migrateRepository(String repositoryName)
protected <T> void processBatched(int batchSize, Collection<T> collection, Consumer<T> consumer, String progressMessage)
protected abstract String probeSession(CoreSession session)
protected abstract void migrateSession(CoreSession session)
Copyright © 2019 Nuxeo. All rights reserved.