Package com.morpheusdata.core.backup
Interface MorpheusBackupJobService
- All Superinterfaces:
MorpheusDataQueryService<BackupJob>
,MorpheusDataService<BackupJob,
,BackupJobIdentityProjection> MorpheusIdentityService<BackupJobIdentityProjection>
public interface MorpheusBackupJobService
extends MorpheusDataService<BackupJob,BackupJobIdentityProjection>, MorpheusIdentityService<BackupJobIdentityProjection>
Context methods for interacting with
BackupJob
in Morpheus. Backup Jobs contain one or more backups and optional
have a schedule to automatically run the job at a recurring interval.- Since:
- 0.13.4
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>
Creates new Backup Job Domains from cache / sync implementationsReturns the BackupContext used for performing updates or queries onBackup
related assets within Morpheus.io.reactivex.rxjava3.core.Observable<BackupJob>
listById
(Collection<Long> ids) Lists allBackupJob
objects by a list of Identifiers.io.reactivex.rxjava3.core.Observable<BackupJobIdentityProjection>
listIdentityProjections
(BackupProvider backupProvider) Lists all backup job projection objects for a specified backup provider id.io.reactivex.rxjava3.core.Single<Boolean>
remove
(List<BackupJobIdentityProjection> removeList) Removes missing Backup Jobs on the Morpheus side.io.reactivex.rxjava3.core.Single<BackupJob>
Saves aBackupJob
object.io.reactivex.rxjava3.core.Single<Boolean>
Saves a list ofBackupJob
objects.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, remove
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getBackup
MorpheusBackupService getBackup()Returns the BackupContext used for performing updates or queries onBackup
related assets within Morpheus. Typically this would be called by aBackupProvider
- Returns:
- An instance of the Backup Context to be used for calls by various backup providers
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<BackupJobIdentityProjection> listIdentityProjections(BackupProvider backupProvider) Lists all backup job projection objects for a specified backup provider id. The projection is a subset of the properties on a fullBackup
object for sync matching.- Parameters:
backupProvider
- theAbstractBackupProvider
identifier associated to the backups to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
Lists allBackupJob
objects by a list of Identifiers. This is commonly used in sync / caching logic. -
remove
Removes missing Backup Jobs on the Morpheus side. This accepts the Projection Object instead of the main Object. It is important to note this is an Observer pattern and must be subscribed to in order for the action to occurExample:
morpheusContext.getBackupJob().remove(removeItems).blockingGet()
- Specified by:
remove
in interfaceMorpheusDataService<BackupJob,
BackupJobIdentityProjection> - Parameters:
removeList
- a list of backup job projections to be removed- Returns:
- a Single
Observable
returning the success status of the operation. - See Also:
-
create
Creates new Backup Job Domains from cache / sync implementations- Specified by:
create
in interfaceMorpheusDataService<BackupJob,
BackupJobIdentityProjection> - Parameters:
addList
- List of newBackupJob
objects to be inserted into the database- Returns:
- notification of completion
- See Also:
-
save
Saves a list ofBackupJob
objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
save
in interfaceMorpheusDataService<BackupJob,
BackupJobIdentityProjection> - Parameters:
saveList
- a List of Backup Job objects that need to be updated in the database.- Returns:
- the Single Observable stating the success state of the save attempt
- See Also:
-
save
Saves aBackupJob
object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
save
in interfaceMorpheusDataService<BackupJob,
BackupJobIdentityProjection> - Parameters:
backupJob
- a Backup Object to be updated in the database.- Returns:
- the Single Observable containing the resulting Backup Job Object
-