Class TapeDriveWorkerManager
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.worker.TapeDriveWorkerManager
-
- All Implemented Interfaces:
TapeDriveOrderConsumer
,TapeDriveOrderProducer
public class TapeDriveWorkerManager extends java.lang.Object implements TapeDriveOrderConsumer, TapeDriveOrderProducer
-
-
Constructor Summary
Constructors Constructor Description TapeDriveWorkerManager(QueueRepository readWriteQueue, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestManager accessRequestManager, TapeLibraryPool tapeLibraryPool, java.util.Map<java.lang.Integer,TapeCatalog> driveTape, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveCacheStorage archiveCacheStorage, TapeCatalogService tapeCatalogService, java.lang.Integer fullCartridgeDetectionThresholdInMB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<? extends ReadWriteOrder>
consume(TapeDriveWorker driveWorker)
int
getInterruptedWorkerCount()
QueueRepository
getQueue()
int
getTotalWorkerCount()
void
initializeOnBootstrap()
java.util.Optional<? extends ReadWriteOrder>
produce(TapeDriveWorker driveWorker)
void
shutdown()
void
shutdown(long timeout, java.util.concurrent.TimeUnit timeUnit)
void
startWorkers()
-
-
-
Constructor Detail
-
TapeDriveWorkerManager
public TapeDriveWorkerManager(QueueRepository readWriteQueue, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestManager accessRequestManager, TapeLibraryPool tapeLibraryPool, java.util.Map<java.lang.Integer,TapeCatalog> driveTape, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveCacheStorage archiveCacheStorage, TapeCatalogService tapeCatalogService, java.lang.Integer fullCartridgeDetectionThresholdInMB)
-
-
Method Detail
-
startWorkers
public void startWorkers()
-
shutdown
public void shutdown()
-
shutdown
public void shutdown(long timeout, java.util.concurrent.TimeUnit timeUnit)
-
getQueue
public QueueRepository getQueue()
- Specified by:
getQueue
in interfaceTapeDriveOrderConsumer
-
consume
public java.util.Optional<? extends ReadWriteOrder> consume(TapeDriveWorker driveWorker) throws QueueException
- Specified by:
consume
in interfaceTapeDriveOrderConsumer
- Throws:
QueueException
-
produce
public java.util.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()
-
-