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
static long
SLEEP_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 boolean
checkTapeLabel(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges)
java.lang.Integer
getDriveIndex()
TapeDriveSpec
getDriveStatus(ReadWriteErrorCode readWriteErrorCode)
java.lang.String
getLibraryIdentifier()
java.lang.String
getOutputDirectory()
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
unloadTape(TapeCatalog tape)
void
write(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:
goToPosition
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
-
getOutputDirectory
public java.lang.String getOutputDirectory()
- Specified by:
getOutputDirectory
in interfaceTapeLibraryService
-
checkTapeLabel
public boolean checkTapeLabel(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges) throws ReadWriteException
- Specified by:
checkTapeLabel
in interfaceTapeLibraryService
- Returns:
- true to inform that update tape catalog is needed, false else
- Throws:
ReadWriteException
-
-