Package com.morpheusdata.core.backup
Interface MorpheusBackupJobService
-
public interface MorpheusBackupJobService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<java.lang.Boolean>
create(java.util.List<BackupJob> addList)
Creates new Backup Job Domains from cache / sync implementationsMorpheusBackupService
getBackup()
Returns the BackupContext used for performing updates or queries onBackup
related assets within Morpheus.io.reactivex.Observable<BackupJobIdentityProjection>
listById(java.util.Collection<java.lang.Long> ids)
Lists allBackupJob
objects by a list of Identifiers.io.reactivex.Observable<BackupJobIdentityProjection>
listIdentityProjections(BackupProvider backupProvider)
Lists all backup job projection objects for a specified backup provider id.io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<BackupJobIdentityProjection> removeList)
Removes missing Backup Jobs on the Morpheus side.io.reactivex.Single<BackupJob>
save(BackupJob backupJob)
Saves aBackupJob
object.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<BackupJob> saveList)
Saves a list ofBackupJob
objects.
-
-
-
Method Detail
-
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.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
io.reactivex.Observable<BackupJobIdentityProjection> listById(java.util.Collection<java.lang.Long> ids)
Lists allBackupJob
objects by a list of Identifiers. This is commonly used in sync / caching logic.
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.util.List<BackupJobIdentityProjection> removeList)
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 a Observer pattern and must be subscribed to in order for the action to occurExample:
morpheusContext.getBackupJob().remove(removeItems).blockingGet()
- Parameters:
removeList
- a list of backup job projections to be removed- Returns:
- a Single
Observable
returning the success status of the operation.
-
create
io.reactivex.Single<java.lang.Boolean> create(java.util.List<BackupJob> addList)
Creates new Backup Job Domains from cache / sync implementations- Parameters:
addList
- List of newBackupJob
objects to be inserted into the database- Returns:
- notification of completion
-
save
io.reactivex.Single<java.lang.Boolean> save(java.util.List<BackupJob> saveList)
Saves a list ofBackupJob
objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- 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
-
save
io.reactivex.Single<BackupJob> save(BackupJob backupJob)
Saves aBackupJob
object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Parameters:
backupJob
- a Backup Object to be updated in the database.- Returns:
- the Single Observable containing the resulting Backup Job Object
-
-