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, ReadRequestReferentialRepository readRequestReferentialRepository, TapeLibraryPool tapeLibraryPool, java.util.Map<java.lang.Integer,TapeCatalog> driveTape, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveOutputRetentionPolicy archiveOutputRetentionPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<? extends ReadWriteOrder>
consume(TapeDriveWorker driveWorker)
void
enqueue(QueueMessageEntity entity)
QueueRepository
getQueue()
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, ReadRequestReferentialRepository readRequestReferentialRepository, TapeLibraryPool tapeLibraryPool, java.util.Map<java.lang.Integer,TapeCatalog> driveTape, java.lang.String inputTarPath, boolean forceOverrideNonEmptyCartridges, ArchiveOutputRetentionPolicy archiveOutputRetentionPolicy)
-
-
Method Detail
-
startWorkers
public void startWorkers()
-
enqueue
public void enqueue(QueueMessageEntity entity) throws QueueException
- Throws:
QueueException
-
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
-
-