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.String
MSG_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 void
checkNonEmptyTapeLabel(TapeCatalog tape)
void
ensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges)
java.lang.Integer
getDriveIndex()
TapeDriveSpec
getDriveStatus(ReadWriteErrorCode readWriteErrorCode)
java.lang.String
getLibraryIdentifier()
java.lang.String
getTmpOutputDirectory()
void
goToPosition(TapeCatalog tape, java.lang.Integer position, ReadWriteErrorCode readWriteErrorCode)
void
loadTape(TapeCatalog tape)
void
read(TapeCatalog tape, java.lang.Integer position, java.lang.String outputPath)
void
rewindTape(TapeCatalog tape)
void
unloadTape(TapeCatalog tape)
void
write(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:
goToPosition
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
rewindTape
public void rewindTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
rewindTape
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
write
public void write(java.lang.String filePath, long writtenBytes, TapeCatalog tape) throws ReadWriteException
- Specified by:
write
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
read
public void read(TapeCatalog tape, java.lang.Integer position, java.lang.String outputPath) throws ReadWriteException
- Specified by:
read
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
loadTape
public void loadTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
loadTape
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
unloadTape
public void unloadTape(TapeCatalog tape) throws ReadWriteException
- Specified by:
unloadTape
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
getDriveStatus
public TapeDriveSpec getDriveStatus(ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
- Specified by:
getDriveStatus
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
getDriveIndex
public java.lang.Integer getDriveIndex()
- Specified by:
getDriveIndex
in interfaceTapeLibraryService
-
getLibraryIdentifier
public java.lang.String getLibraryIdentifier()
- Specified by:
getLibraryIdentifier
in interfaceTapeLibraryService
-
getTmpOutputDirectory
public java.lang.String getTmpOutputDirectory()
- Specified by:
getTmpOutputDirectory
in interfaceTapeLibraryService
-
ensureTapeIsEmpty
public void ensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges) throws ReadWriteException
- Specified by:
ensureTapeIsEmpty
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
checkNonEmptyTapeLabel
public void checkNonEmptyTapeLabel(TapeCatalog tape) throws ReadWriteException
- Specified by:
checkNonEmptyTapeLabel
in interfaceTapeLibraryService
- Throws:
ReadWriteException
-
-