Interface MigrationService
public interface MigrationService
- Since:
- 5.13
-
Method Summary
Modifier and TypeMethodDescriptioncancelExport
(long jobId) Cancels the export job.cancelImport
(long jobId) Cancels the import job.cancelMeshMigration
(long jobId) Cancels the migration job.getExportJob
(long jobId) Retrieves the export job.getImportJob
(long jobId) Retrieves the import job.getMeshMigrationJob
(long jobId) Retrieves the migration job.previewExport
(ExportRequest request) Resolves export items without triggering an export.previewMeshMigration
(MeshMigrationRequest request) Resolves repositories to be migrated without triggering a migration.searchExportJobMessages
(MigrationJobMessageSearchRequest request, PageRequest pageRequest) Finds alljob messages
matching the supplied request object for an export job.searchImportJobMessages
(MigrationJobMessageSearchRequest request, PageRequest pageRequest) Finds alljob messages
matching the supplied request object for an import job.searchMeshMigrationJobMessages
(MigrationJobMessageSearchRequest request, PageRequest pageRequest) Finds alljob messages
matching the supplied request object for a migration job.startExport
(ExportRequest request) Export the repositories specified in theexport request
.startImport
(ImportRequest request) Import the data contained in the archive specified in theimport request
.startMeshMigration
(MeshMigrationRequest request) Start a job that migrates the repository or repositories specified in themigration request
to external Mesh nodes.
-
Method Details
-
cancelExport
Cancels the export job. This happens immediately and the resulting archive is not usable.- Parameters:
jobId
- the ID of the export job- Returns:
- export job or
Optional.empty()
if the export job doesn't exist - Throws:
IllegalStateException
- if the job has been canceled already, or if it had ended- See Also:
-
cancelImport
Cancels the import job. The currently importing repository will finish importing and then the import will be canceled.- Parameters:
jobId
- the ID of the import job- Returns:
- import job or
Optional.empty()
if the import job doesn't exist - Throws:
IllegalStateException
- if the job has been canceled already, or if it had ended- See Also:
-
cancelMeshMigration
Cancels the migration job. The currently migrating hierarchy will finish migrating and then the migration will be canceled.- Parameters:
jobId
- the ID of the migration job- Returns:
- import job or
Optional.empty()
if the migration job doesn't exist - Throws:
IllegalStateException
- if the job has been canceled already, or if it had ended- Since:
- 8.0
- See Also:
-
getExportJob
Retrieves the export job.- Parameters:
jobId
- the ID of the export job- Returns:
- export job
- See Also:
-
getImportJob
Retrieves the import job.- Parameters:
jobId
- the ID of the import job- Returns:
- import job
- See Also:
-
getMeshMigrationJob
Retrieves the migration job.- Parameters:
jobId
- the ID of the migration job- Returns:
- migration job
- Since:
- 8.0
- See Also:
-
previewExport
Resolves export items without triggering an export.- Parameters:
request
- a request object describing the repositories to be exported- Returns:
- the items to be exported if an export job with the given request were triggered
-
previewMeshMigration
Resolves repositories to be migrated without triggering a migration.- Parameters:
request
- a request object describing the repositories to be migrated- Returns:
- the repositories to be migrated if a migration job with the given request were triggered
- Since:
- 8.0
-
searchExportJobMessages
@Nonnull Page<JobMessage> searchExportJobMessages(@Nonnull MigrationJobMessageSearchRequest request, @Nonnull PageRequest pageRequest) Finds alljob messages
matching the supplied request object for an export job.- Parameters:
request
- the requestpageRequest
- the page request- Returns:
- the page of matching
job messages
- Throws:
IllegalArgumentException
- if thejob ID
on the request is not an export job ID
-
searchImportJobMessages
@Nonnull Page<JobMessage> searchImportJobMessages(@Nonnull MigrationJobMessageSearchRequest request, @Nonnull PageRequest pageRequest) Finds alljob messages
matching the supplied request object for an import job.- Parameters:
request
- the requestpageRequest
- the page request- Returns:
- the page of matching
job messages
- Throws:
IllegalArgumentException
- if thejob ID
on the request is not an import job ID
-
searchMeshMigrationJobMessages
@Nonnull Page<JobMessage> searchMeshMigrationJobMessages(@Nonnull MigrationJobMessageSearchRequest request, @Nonnull PageRequest pageRequest) Finds alljob messages
matching the supplied request object for a migration job.- Parameters:
request
- the requestpageRequest
- the page request- Returns:
- the page of matching
job messages
- Throws:
IllegalArgumentException
- if thejob ID
on the request is not a Mesh migration job ID- Since:
- 8.0
-
startExport
Export the repositories specified in theexport request
.- Parameters:
request
- a request object describing the repositories to be exported- Returns:
- the export job, the export job contains an export ID which could be used to retrieve the job status
- Throws:
MaxConcurrentMigrationJobsException
- if the maximum number of concurrent migration jobs are already running on this node- See Also:
-
startImport
Import the data contained in the archive specified in theimport request
.- Parameters:
request
- a request object specifying the archive to import- Returns:
- the import job, the import job contains an import ID which could be used to retrieve the job status
- Throws:
MaxConcurrentMigrationJobsException
- if the maximum number of concurrent migration jobs are already running on this node- See Also:
-
startMeshMigration
Start a job that migrates the repository or repositories specified in themigration request
to external Mesh nodes.- Parameters:
request
- a request object specifying the repositories to migrate to Mesh- Returns:
- the migration job, which contains an migration ID which could be used to retrieve the job status
- Throws:
MaxConcurrentMigrationJobsException
- if the maximum number of concurrent migration jobs are already running in this cluster- Since:
- 8.0
- See Also:
-