Interface MorpheusBackupJobService

All Superinterfaces:
MorpheusDataQueryService<BackupJob>, 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 Details

    • getBackup

      Returns the BackupContext used for performing updates or queries on Backup related assets within Morpheus. Typically this would be called by a BackupProvider
      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 full Backup object for sync matching.
      Parameters:
      backupProvider - the AbstractBackupProvider identifier associated to the backups to be listed.
      Returns:
      an RxJava Observable stream of result projection objects.
    • listById

      io.reactivex.rxjava3.core.Observable<BackupJob> listById(Collection<Long> ids)
      Lists all BackupJob objects by a list of Identifiers. This is commonly used in sync / caching logic.
      Parameters:
      ids - list of BackupJob ids to fetch.
      Returns:
      an RxJava Observable stream of Backup objects for subscription.
    • remove

      io.reactivex.rxjava3.core.Single<Boolean> remove(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 an Observer pattern and must be subscribed to in order for the action to occur

      Example:

      
       morpheusContext.getBackupJob().remove(removeItems).blockingGet()
       
      Specified by:
      remove in interface MorpheusDataService<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

      io.reactivex.rxjava3.core.Single<Boolean> create(List<BackupJob> addList)
      Creates new Backup Job Domains from cache / sync implementations
      Specified by:
      create in interface MorpheusDataService<BackupJob,BackupJobIdentityProjection>
      Parameters:
      addList - List of new BackupJob objects to be inserted into the database
      Returns:
      notification of completion
      See Also:
    • save

      io.reactivex.rxjava3.core.Single<Boolean> save(List<BackupJob> saveList)
      Saves a list of BackupJob objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
      Specified by:
      save in interface MorpheusDataService<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

      io.reactivex.rxjava3.core.Single<BackupJob> save(BackupJob backupJob)
      Saves a BackupJob object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
      Specified by:
      save in interface MorpheusDataService<BackupJob,BackupJobIdentityProjection>
      Parameters:
      backupJob - a Backup Object to be updated in the database.
      Returns:
      the Single Observable containing the resulting Backup Job Object