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 onBackuprelated assets within Morpheus.io.reactivex.rxjava3.core.Observable<BackupJob>listById(Collection<Long> ids) Lists allBackupJobobjects 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 aBackupJobobject.io.reactivex.rxjava3.core.Single<Boolean>Saves a list ofBackupJobobjects.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, removeMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getBackup
MorpheusBackupService getBackup()Returns the BackupContext used for performing updates or queries onBackuprelated 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 fullBackupobject for sync matching.- Parameters:
backupProvider- theAbstractBackupProvideridentifier associated to the backups to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
Lists allBackupJobobjects 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:
removein interfaceMorpheusDataService<BackupJob,BackupJobIdentityProjection> - Parameters:
removeList- a list of backup job projections to be removed- Returns:
- a Single
Observablereturning the success status of the operation. - See Also:
-
create
Creates new Backup Job Domains from cache / sync implementations- Specified by:
createin interfaceMorpheusDataService<BackupJob,BackupJobIdentityProjection> - Parameters:
addList- List of newBackupJobobjects to be inserted into the database- Returns:
- notification of completion
- See Also:
-
save
Saves a list ofBackupJobobjects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein 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 aBackupJobobject. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein interfaceMorpheusDataService<BackupJob,BackupJobIdentityProjection> - Parameters:
backupJob- a Backup Object to be updated in the database.- Returns:
- the Single Observable containing the resulting Backup Job Object
-