Class TapeLibraryServiceImpl
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.impl.readwrite.TapeLibraryServiceImpl
-
- All Implemented Interfaces:
TapeLibraryService
public class TapeLibraryServiceImpl extends java.lang.Object implements TapeLibraryService
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringMSG_PREFIX-
Fields inherited from interface fr.gouv.vitam.storage.offers.tape.spec.TapeLibraryService
TAPE_LABEL, TAPE_MSG
-
-
Constructor Summary
Constructors Constructor Description TapeLibraryServiceImpl(TapeDriveService tapeDriveService, TapeRobotPool tapeRobotPool, int fullCartridgeDetectionThresholdInMB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckNonEmptyTapeLabel(TapeCatalog tape)voidensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges)java.lang.IntegergetDriveIndex()TapeDriveSpecgetDriveStatus(ReadWriteErrorCode readWriteErrorCode)java.lang.StringgetLibraryIdentifier()java.lang.StringgetTmpOutputDirectory()voidgoToPosition(TapeCatalog tape, java.lang.Integer position, ReadWriteErrorCode readWriteErrorCode)voidloadTape(TapeCatalog tape)voidread(TapeCatalog tape, java.lang.Integer position, java.lang.String outputPath)voidrewindTape(TapeCatalog tape)voidunloadTape(TapeCatalog tape)voidwrite(java.lang.String filePath, long writtenBytes, TapeCatalog tape)
-
-
-
Constructor Detail
-
TapeLibraryServiceImpl
public TapeLibraryServiceImpl(TapeDriveService tapeDriveService, TapeRobotPool tapeRobotPool, int fullCartridgeDetectionThresholdInMB)
-
-
Method Detail
-
goToPosition
public void goToPosition(TapeCatalog tape, java.lang.Integer position, ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
- Specified by:
goToPositionin interfaceTapeLibraryService- Throws:
ReadWriteException
-
rewindTape
public void rewindTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
rewindTapein interfaceTapeLibraryService- Throws:
ReadWriteException
-
write
public void write(java.lang.String filePath, long writtenBytes, TapeCatalog tape) throws ReadWriteException- Specified by:
writein interfaceTapeLibraryService- Throws:
ReadWriteException
-
read
public void read(TapeCatalog tape, java.lang.Integer position, java.lang.String outputPath) throws ReadWriteException
- Specified by:
readin interfaceTapeLibraryService- Throws:
ReadWriteException
-
loadTape
public void loadTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
loadTapein interfaceTapeLibraryService- Throws:
ReadWriteException
-
unloadTape
public void unloadTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
unloadTapein interfaceTapeLibraryService- Throws:
ReadWriteException
-
getDriveStatus
public TapeDriveSpec getDriveStatus(ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
- Specified by:
getDriveStatusin interfaceTapeLibraryService- Throws:
ReadWriteException
-
getDriveIndex
public java.lang.Integer getDriveIndex()
- Specified by:
getDriveIndexin interfaceTapeLibraryService
-
getLibraryIdentifier
public java.lang.String getLibraryIdentifier()
- Specified by:
getLibraryIdentifierin interfaceTapeLibraryService
-
getTmpOutputDirectory
public java.lang.String getTmpOutputDirectory()
- Specified by:
getTmpOutputDirectoryin interfaceTapeLibraryService
-
ensureTapeIsEmpty
public void ensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges) throws ReadWriteException
- Specified by:
ensureTapeIsEmptyin interfaceTapeLibraryService- Throws:
ReadWriteException
-
checkNonEmptyTapeLabel
public void checkNonEmptyTapeLabel(TapeCatalog tape) throws ReadWriteException
- Specified by:
checkNonEmptyTapeLabelin interfaceTapeLibraryService- Throws:
ReadWriteException
-
-