Class RestoreBackupService
- java.lang.Object
-
- fr.gouv.vitam.metadata.core.reconstruction.RestoreBackupService
-
public class RestoreBackupService extends java.lang.Object
Service used to recover a Backup copy of the given metadata Vitam collection.
-
-
Constructor Summary
Constructors Constructor Description RestoreBackupService()
ConstructorRestoreBackupService(StorageClientFactory storageClientFactory)
Constructor for tests
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<OfferLog>
getListing(java.lang.String strategy, DataCategory category, java.lang.Long offset, java.lang.Integer limit, Order order, int batchSize)
Retrieve list of offer log defining objects to reconstruct from offer logMetadataBackupModel
loadData(java.lang.String strategy, MetadataCollections collection, java.lang.String filename, long offset)
Load data from storagejava.io.InputStream
loadData(java.lang.String strategy, DataCategory category, java.lang.String filename)
-
-
-
Constructor Detail
-
RestoreBackupService
public RestoreBackupService()
Constructor
-
RestoreBackupService
public RestoreBackupService(StorageClientFactory storageClientFactory)
Constructor for tests- Parameters:
storageClientFactory
- storage client factory
-
-
Method Detail
-
getListing
public java.util.Iterator<OfferLog> getListing(java.lang.String strategy, DataCategory category, java.lang.Long offset, java.lang.Integer limit, Order order, int batchSize)
Retrieve list of offer log defining objects to reconstruct from offer log- Parameters:
strategy
- storage strategycategory
- collectionoffset
- offsetlimit
- limitbatchSize
-- Returns:
- list of offer log by bulk
- Throws:
VitamRuntimeException
- storage errorjava.lang.IllegalArgumentException
- input error
-
loadData
public MetadataBackupModel loadData(java.lang.String strategy, MetadataCollections collection, java.lang.String filename, long offset) throws StorageNotFoundException
Load data from storage- Parameters:
strategy
- storage strategycollection
- collectionfilename
- name of file to loadoffset
- offset- Returns:
- data
- Throws:
VitamRuntimeException
- storage errorjava.lang.IllegalArgumentException
- input errorStorageNotFoundException
-
loadData
public java.io.InputStream loadData(java.lang.String strategy, DataCategory category, java.lang.String filename) throws StorageNotFoundException
- Throws:
StorageNotFoundException
-
-