java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.persisters.ObjectPersister

public class ObjectPersister extends Object
Composite persister. Stores imported objects in batches using different persisters. The purpose of this class is to combine multiple Persisters. The class breaks down the list of imported objects into smaller batches and stores each batch asynchronously using multiple/different persisters.
Since:
8.2.0
  • Constructor Details

  • Method Details

    • persistAsynchronously

      public Collection<Future<?>> persistAsynchronously(Collection<ImportedObjectV2> objectsToPersist, String info)
      Run object persisting asynchronously. Can accept any number of records and can split them to a few partitions and persist them in a few different transactions. Returns the collections of the async task futures.
    • persistAsynchronouslyInOneTransaction

      public Future<?> persistAsynchronouslyInOneTransaction(Collection<ImportedObjectV2> objectsToPersist, String info)
      Persist a collection on objects in one transaction asynchronously. It guarantees that all records will be persisted in one and only one transaction. The caller is responsible for not providing large amount of objects. Returns the future of the async persisting task.
    • waitUntilAllJobsFinish

      public void waitUntilAllJobsFinish(Collection<Future<?>> futures) throws BackupRestoreException
      Throws:
      BackupRestoreException