Class OfferSyncService
- java.lang.Object
-
- fr.gouv.vitam.storage.engine.server.offersynchronization.OfferSyncService
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class OfferSyncService extends java.lang.Object implements java.lang.AutoCloseable
Manages offer synchronization service.
-
-
Constructor Summary
Constructors Constructor Description OfferSyncService(StorageDistribution distribution, StorageConfiguration storageConfiguration)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.concurrent.ExecutorService
getExecutor()
OfferSyncStatus
getLastSynchronizationStatus()
boolean
isRunning()
boolean
startSynchronization(java.lang.String sourceOffer, java.lang.String targetOffer, java.lang.String strategyId, DataCategory dataCategory, java.lang.Long offset)
Synchronize an offer from another using the offset.boolean
startSynchronization(java.lang.String sourceOffer, java.lang.String targetOffer, java.lang.String strategyId, java.util.List<OfferPartialSyncItem> items)
-
-
-
Constructor Detail
-
OfferSyncService
public OfferSyncService(StorageDistribution distribution, StorageConfiguration storageConfiguration)
Constructor.
-
-
Method Detail
-
startSynchronization
public boolean startSynchronization(java.lang.String sourceOffer, java.lang.String targetOffer, java.lang.String strategyId, java.util.List<OfferPartialSyncItem> items)
-
startSynchronization
public boolean startSynchronization(java.lang.String sourceOffer, java.lang.String targetOffer, java.lang.String strategyId, DataCategory dataCategory, java.lang.Long offset)
Synchronize an offer from another using the offset.- Parameters:
sourceOffer
- the identifier of the source offertargetOffer
- the identifier of the target offerstrategyId
- the identifier of the strategy containing the two offersoffset
- the offset of the process of the synchronisation
-
isRunning
public boolean isRunning()
-
getLastSynchronizationStatus
public OfferSyncStatus getLastSynchronizationStatus()
-
getExecutor
public java.util.concurrent.ExecutorService getExecutor()
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-