Class TapeDriveWorkerManager
java.lang.Object
fr.gouv.vitam.storage.offers.tape.worker.TapeDriveWorkerManager
- All Implemented Interfaces:
TapeDriveOrderConsumer
,TapeDriveOrderProducer
public class TapeDriveWorkerManager
extends Object
implements TapeDriveOrderConsumer, TapeDriveOrderProducer
-
Constructor Summary
ConstructorDescriptionTapeDriveWorkerManager
(QueueRepository readWriteQueue, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestManager accessRequestManager, TapeLibraryPool tapeLibraryPool, Map<Integer, TapeCatalog> driveTape, String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveCacheStorage archiveCacheStorage, TapeCatalogService tapeCatalogService, Integer fullCartridgeDetectionThresholdInMB) -
Method Summary
Modifier and TypeMethodDescriptionOptional<? extends ReadWriteOrder>
consume
(TapeDriveWorker driveWorker) int
getQueue()
int
void
Optional<? extends ReadWriteOrder>
produce
(TapeDriveWorker driveWorker) void
shutdown()
void
void
-
Constructor Details
-
TapeDriveWorkerManager
public TapeDriveWorkerManager(QueueRepository readWriteQueue, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestManager accessRequestManager, TapeLibraryPool tapeLibraryPool, Map<Integer, TapeCatalog> driveTape, String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveCacheStorage archiveCacheStorage, TapeCatalogService tapeCatalogService, Integer fullCartridgeDetectionThresholdInMB)
-
-
Method Details
-
startWorkers
public void startWorkers() -
shutdown
public void shutdown() -
shutdown
-
getQueue
- Specified by:
getQueue
in interfaceTapeDriveOrderConsumer
-
consume
public Optional<? extends ReadWriteOrder> consume(TapeDriveWorker driveWorker) throws QueueException - Specified by:
consume
in interfaceTapeDriveOrderConsumer
- Throws:
QueueException
-
produce
public Optional<? extends ReadWriteOrder> produce(TapeDriveWorker driveWorker) throws QueueException - Specified by:
produce
in interfaceTapeDriveOrderProducer
- Throws:
QueueException
-
initializeOnBootstrap
public void initializeOnBootstrap() -
getTotalWorkerCount
public int getTotalWorkerCount() -
getInterruptedWorkerCount
public int getInterruptedWorkerCount()
-