Class TapeLibrarySimulator
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.simulator.TapeLibrarySimulator
-
public class TapeLibrarySimulator extends java.lang.ObjectHelper class for emulating a Tape Library behaviour for integration testing purposes. Handles an in-memory tape library (1 changer, x drives, y slots and z tapes), and providesTapeLoadUnloadService,TapeReadWriteServiceandTapeDriveCommandServiceinstances that simulates operations on tape library. Concurrent operations on the same changer, drive, slot or tape is prohibited (e.g. trying to load a tape A into a slot that is currently being unloaded...) Any unexpected error (i.e. reading past last file of a tape, loading from an empty slot...) is reported throughgetFailures()for post test checks
-
-
Constructor Summary
Constructors Constructor Description TapeLibrarySimulator(java.nio.file.Path inputDirectory, java.nio.file.Path tempOutputStorageDirectory, int nbDrives, int nbSlots, int nbTapes, int maxTapeCapacityInBytes, java.lang.String cartridgeType, int sleepDelayMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Exception>getFailures()java.util.List<TapeDriveCommandService>getTapeDriveCommandServices()TapeLoadUnloadServicegetTapeLoadUnloadService()java.util.List<TapeReadWriteService>getTapeReadWriteServices()TapeLibrarySimulatorsetSleepDelayMillis(int sleepDelayMillis)
-
-
-
Method Detail
-
getTapeLoadUnloadService
public TapeLoadUnloadService getTapeLoadUnloadService()
-
getTapeReadWriteServices
public java.util.List<TapeReadWriteService> getTapeReadWriteServices()
-
getTapeDriveCommandServices
public java.util.List<TapeDriveCommandService> getTapeDriveCommandServices()
-
getFailures
public java.util.List<java.lang.Exception> getFailures()
-
setSleepDelayMillis
public TapeLibrarySimulator setSleepDelayMillis(int sleepDelayMillis)
-
-