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_PREFIXstatic longSLEEP_TIME-
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckTapeLabel(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges)java.lang.IntegergetDriveIndex()TapeDriveSpecgetDriveStatus(ReadWriteErrorCode readWriteErrorCode)java.lang.StringgetLibraryIdentifier()java.lang.StringgetOutputDirectory()voidgoToPosition(TapeCatalog tape, java.lang.Integer position, ReadWriteErrorCode readWriteErrorCode)voidloadTape(TapeCatalog tape)voidread(TapeCatalog tape, java.lang.Integer position, java.lang.String outputPath)voidunloadTape(TapeCatalog tape)voidwrite(java.lang.String filePath, long writtenBytes, TapeCatalog tape)
-
-
-
Field Detail
-
SLEEP_TIME
public static final long SLEEP_TIME
- See Also:
- Constant Field Values
-
MSG_PREFIX
public final java.lang.String MSG_PREFIX
-
-
Constructor Detail
-
TapeLibraryServiceImpl
public TapeLibraryServiceImpl(TapeDriveService tapeDriveService, TapeRobotPool tapeRobotPool)
-
-
Method Detail
-
goToPosition
public void goToPosition(TapeCatalog tape, java.lang.Integer position, ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
- Specified by:
goToPositionin 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
-
getOutputDirectory
public java.lang.String getOutputDirectory()
- Specified by:
getOutputDirectoryin interfaceTapeLibraryService
-
checkTapeLabel
public boolean checkTapeLabel(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges) throws ReadWriteException
- Specified by:
checkTapeLabelin interfaceTapeLibraryService- Returns:
- true to inform that update tape catalog is needed, false else
- Throws:
ReadWriteException
-
-