Package fr.gouv.vitam.storage.offers.tape.impl.readwrite

# Class TapeLibraryServiceImpl

java.lang.Object
fr.gouv.vitam.storage.offers.tape.impl.readwrite.TapeLibraryServiceImpl

All Implemented Interfaces:
  `TapeLibraryService`

public class TapeLibraryServiceImpl extends Object implements TapeLibraryService

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final 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

  Modifier and Type
  Method
  Description
  `void`
  `checkNonEmptyTapeLabel(TapeCatalog tape)`
  `void`
  `ensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges)`
  `Integer`
  `getDriveIndex()`
  `TapeDriveSpec`
  `getDriveStatus(ReadWriteErrorCode readWriteErrorCode)`
  `String`
  `getLibraryIdentifier()`
  `String`
  `getTmpOutputDirectory()`
  `void`
  `goToPosition(TapeCatalog tape, Integer position, ReadWriteErrorCode readWriteErrorCode)`
  `void`
  `loadTape(TapeCatalog tape)`
  `void`
  `read(TapeCatalog tape, Integer position, String outputPath)`
  `void`
  `rewindTape(TapeCatalog tape)`
  `void`
  `unloadTape(TapeCatalog tape)`
  `void`
  `write(String filePath, long writtenBytes, TapeCatalog tape)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MSG_PREFIX

    public final String MSG_PREFIX

- ## Constructor Details

  - ### TapeLibraryServiceImpl

    public TapeLibraryServiceImpl(TapeDriveService tapeDriveService, TapeRobotPool tapeRobotPool, int fullCartridgeDetectionThresholdInMB)

- ## Method Details

  - ### goToPosition

    public void goToPosition(TapeCatalog tape, Integer position, ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
    Specified by:
      `goToPosition` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### rewindTape

    public void rewindTape(TapeCatalog tape) throws ReadWriteException
    Specified by:
      `rewindTape` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### write

    public void write(String filePath, long writtenBytes, TapeCatalog tape) throws ReadWriteException
    Specified by:
      `write` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### read

    public void read(TapeCatalog tape, Integer position, String outputPath) throws ReadWriteException
    Specified by:
      `read` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### loadTape

    public void loadTape(TapeCatalog tape) throws ReadWriteException
    Specified by:
      `loadTape` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### unloadTape

    public void unloadTape(TapeCatalog tape) throws ReadWriteException
    Specified by:
      `unloadTape` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### getDriveStatus

    public TapeDriveSpec getDriveStatus(ReadWriteErrorCode readWriteErrorCode) throws ReadWriteException
    Specified by:
      `getDriveStatus` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### getDriveIndex

    public Integer getDriveIndex()
    Specified by:
      `getDriveIndex` in interface `TapeLibraryService`

  - ### getLibraryIdentifier

    public String getLibraryIdentifier()
    Specified by:
      `getLibraryIdentifier` in interface `TapeLibraryService`

  - ### getTmpOutputDirectory

    public String getTmpOutputDirectory()
    Specified by:
      `getTmpOutputDirectory` in interface `TapeLibraryService`

  - ### ensureTapeIsEmpty

    public void ensureTapeIsEmpty(TapeCatalog tape, boolean forceOverrideNonEmptyCartridges) throws ReadWriteException
    Specified by:
      `ensureTapeIsEmpty` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`

  - ### checkNonEmptyTapeLabel

    public void checkNonEmptyTapeLabel(TapeCatalog tape) throws ReadWriteException
    Specified by:
      `checkNonEmptyTapeLabel` in interface `TapeLibraryService`
    Throws:
      `ReadWriteException`