@Test public void createReadOrderOK() throws ObjectReferentialException, IOException, ContentAddressableStorageNotFoundException, ContentAddressableStorageServerException, URISyntaxException, TapeCatalogException, ReadRequestReferentialException, ArchiveReferentialException { String tapeCode = "VIT002L6"; int fileSize = 6; String tarId = "20190625115513038-406fceff-2c4f-475c-898f-493331756eda.tar"; TapeLibraryObjectReferentialId objectReferentialId = new TapeLibraryObjectReferentialId("0_object", "aeaaaaaaaafklihzablkmallwljiqoiaaaaq"); TapeLibraryTarObjectStorageLocation tarObjectStorageLocation = new TapeLibraryTarObjectStorageLocation( Arrays.asList( new TarEntryDescription( tarId, "0_object/aeaaaaaaaaecntv2ab5tmallrz6wdwqaaaaq-aeaaaaaaaaecntv2ab5meallrz6w2eaaaaaq-0", 1024, fileSize, "86c0bc701ef6b5dd21b080bc5bb2af38097baa6237275da83a52f092c9eae3e4e4b0247391620bd732fe824d18bd3bb6c37e62ec73a8cf3585c6a799399861b1" ))); Optional<TapeObjectReferentialEntity> objectReferentialEntity = Optional.of(new TapeObjectReferentialEntity( objectReferentialId, fileSize, "SHA-512", "664ac614a819df2a97d2a5df57dcad91d6ec38b0fffc793e80c56b4553a14ac7a5f0bce3bb71af419b0bb8f151ad3d512867454eeb818e01818a31989c13319b", "aeaaaaaaaafklihzablkmallwljiqoiaaaaq-aeaaaaaaaafklihzabqb2allwljjpiaaaaaq", tarObjectStorageLocation, null, null)); Optional<TapeArchiveReferentialEntity> tarReferentialEntity = Optional.of( new TapeArchiveReferentialEntity(tarId, new TapeLibraryOnTapeArchiveStorageLocation(tapeCode, 248), 5120L, "60566c5d1821190fe9d1df5a7c112ff7b9ff3aec0fbcc6b9934cbebc3f9b33ef1c0aef1c1acd2291c8adb23e6cdcd36b34a2cf9fa564e9f686ea3baf5447e222", null) ); Files.copy(PropertiesUtils.getResourcePath("tar/" + tarId), Paths.get(outputTarsPath + "/" + tarId)); TapeCatalog tape = new TapeCatalog(); tape.setCode(tapeCode); tape.setBucket("bucket"); ArgumentCaptor<List<QueryCriteria>> captor = ArgumentCaptor.forClass(List.class); when(tapeCatalogService.find(captor.capture())).thenReturn(Arrays.asList(tape)); when(objectReferentialRepository.find(anyString(), anyString())).thenReturn(objectReferentialEntity); when(archiveReferentialRepository.find(anyString())).thenReturn(tarReferentialEntity); String readOrderId = tapeLibraryContentAddressableStorage .createReadOrderRequest("0_object", Arrays.asList("aeaaaaaaaaecntv2ab5tmallrz6wdwqaaaaq")); assertThat(readOrderId).isNotNull(); TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity = mock(TapeReadRequestReferentialEntity.class); when(tapeReadRequestReferentialEntity.isCompleted()).thenReturn(true); when(readRequestReferentialRepository.find(eq(readOrderId))) .thenReturn(Optional.of(tapeReadRequestReferentialEntity)); try { Thread.sleep(1000); } catch (InterruptedException e) { } assertThat(readRequestReferentialRepository.find(readOrderId).get().isCompleted()).isTrue(); }
@Override public String createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException { TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity; List<FileInTape> filesInTape = new ArrayList<>(); String readRequestId = GUIDFactory.newGUID().getId(); Map<String, TarLocation> tarLocationMap = new HashMap<>(); Set<String> archiveSet = new HashSet<>(); try { for (String objectName : objectsIds) { Optional<TapeObjectReferentialEntity> object = objectReferentialRepository.find(containerName, objectName); if (!object.isPresent()) { throw new ContentAddressableStorageNotFoundException( ErrorMessage.OBJECT_NOT_FOUND + containerName + "/" + objectName); } TapeLibraryObjectStorageLocation location = object.get().getLocation(); if (!(location instanceof TapeLibraryTarObjectStorageLocation)) { throw new UnsupportedOperationException("Object stored in tar. Not implemented yet"); } List<TarEntryDescription> tarEntryDescriptions = ((TapeLibraryTarObjectStorageLocation) location).getTarEntries(); if (tarEntryDescriptions == null || tarEntryDescriptions.isEmpty()) { throw new IllegalStateException( "empty TAR description for object : " + containerName + "/" + objectName); } for (TarEntryDescription o : tarEntryDescriptions) { archiveSet.add(o.getTarFileId()); String tarFileIdWithoutExtension = StringUtils.substringBeforeLast(o.getTarFileId(), "."); Path path = archiveOutputRetentionPolicy.get(o.getTarFileId()); if (null != path) { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.DISK); } else { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.TAPE); } } filesInTape.add(new FileInTape(objectName, object.get().getStorageId(), tarEntryDescriptions)); } tapeReadRequestReferentialEntity = new TapeReadRequestReferentialEntity(readRequestId, containerName, tarLocationMap, filesInTape); readRequestReferentialRepository.insert(tapeReadRequestReferentialEntity); for (String tarId : archiveSet) { Optional<TapeArchiveReferentialEntity> tapeLibraryTarReferentialEntity = archiveReferentialRepository.find(tarId); if (!tapeLibraryTarReferentialEntity.isPresent()) { throw new IllegalStateException("TAR information not found for tarId : " + tarId); } TapeLibraryArchiveStorageLocation tarLocation = tapeLibraryTarReferentialEntity.get().getLocation(); if (!(tarLocation instanceof TapeLibraryOnTapeArchiveStorageLocation)) { throw new UnsupportedOperationException("Tar file is not yet on tape."); } String tarIdWithoutExtension = StringUtils.substringBeforeLast(tarId, "."); if (tarLocationMap.get(tarIdWithoutExtension).equals(TarLocation.DISK)) { continue; } String tapeCode = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getTapeCode(); Integer filePosition = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getFilePosition(); String bucketId = getBucketByTapeCode(tapeCode); ReadOrder readOrder = new ReadOrder(readRequestId, tapeCode, filePosition, tarId, bucketId); readWriteQueue.addIfAbsent( Arrays.asList( new QueryCriteria(ReadOrder.FILE_NAME, tarId, QueryCriteriaOperator.EQ), new QueryCriteria(ReadOrder.MESSAGE_TYPE, QueueMessageType.ReadOrder.name(), QueryCriteriaOperator.EQ)), readOrder); } } catch (ObjectReferentialException | QueueException | ArchiveReferentialException | TapeCatalogException | ReadRequestReferentialException e) { throw new ContentAddressableStorageServerException( "Error on reading from tape"); } return tapeReadRequestReferentialEntity.getRequestId(); }
TapeLibraryContentAddressableStorage implements ContentAddressableStorage { @Override public String createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException { TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity; List<FileInTape> filesInTape = new ArrayList<>(); String readRequestId = GUIDFactory.newGUID().getId(); Map<String, TarLocation> tarLocationMap = new HashMap<>(); Set<String> archiveSet = new HashSet<>(); try { for (String objectName : objectsIds) { Optional<TapeObjectReferentialEntity> object = objectReferentialRepository.find(containerName, objectName); if (!object.isPresent()) { throw new ContentAddressableStorageNotFoundException( ErrorMessage.OBJECT_NOT_FOUND + containerName + "/" + objectName); } TapeLibraryObjectStorageLocation location = object.get().getLocation(); if (!(location instanceof TapeLibraryTarObjectStorageLocation)) { throw new UnsupportedOperationException("Object stored in tar. Not implemented yet"); } List<TarEntryDescription> tarEntryDescriptions = ((TapeLibraryTarObjectStorageLocation) location).getTarEntries(); if (tarEntryDescriptions == null || tarEntryDescriptions.isEmpty()) { throw new IllegalStateException( "empty TAR description for object : " + containerName + "/" + objectName); } for (TarEntryDescription o : tarEntryDescriptions) { archiveSet.add(o.getTarFileId()); String tarFileIdWithoutExtension = StringUtils.substringBeforeLast(o.getTarFileId(), "."); Path path = archiveOutputRetentionPolicy.get(o.getTarFileId()); if (null != path) { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.DISK); } else { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.TAPE); } } filesInTape.add(new FileInTape(objectName, object.get().getStorageId(), tarEntryDescriptions)); } tapeReadRequestReferentialEntity = new TapeReadRequestReferentialEntity(readRequestId, containerName, tarLocationMap, filesInTape); readRequestReferentialRepository.insert(tapeReadRequestReferentialEntity); for (String tarId : archiveSet) { Optional<TapeArchiveReferentialEntity> tapeLibraryTarReferentialEntity = archiveReferentialRepository.find(tarId); if (!tapeLibraryTarReferentialEntity.isPresent()) { throw new IllegalStateException("TAR information not found for tarId : " + tarId); } TapeLibraryArchiveStorageLocation tarLocation = tapeLibraryTarReferentialEntity.get().getLocation(); if (!(tarLocation instanceof TapeLibraryOnTapeArchiveStorageLocation)) { throw new UnsupportedOperationException("Tar file is not yet on tape."); } String tarIdWithoutExtension = StringUtils.substringBeforeLast(tarId, "."); if (tarLocationMap.get(tarIdWithoutExtension).equals(TarLocation.DISK)) { continue; } String tapeCode = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getTapeCode(); Integer filePosition = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getFilePosition(); String bucketId = getBucketByTapeCode(tapeCode); ReadOrder readOrder = new ReadOrder(readRequestId, tapeCode, filePosition, tarId, bucketId); readWriteQueue.addIfAbsent( Arrays.asList( new QueryCriteria(ReadOrder.FILE_NAME, tarId, QueryCriteriaOperator.EQ), new QueryCriteria(ReadOrder.MESSAGE_TYPE, QueueMessageType.ReadOrder.name(), QueryCriteriaOperator.EQ)), readOrder); } } catch (ObjectReferentialException | QueueException | ArchiveReferentialException | TapeCatalogException | ReadRequestReferentialException e) { throw new ContentAddressableStorageServerException( "Error on reading from tape"); } return tapeReadRequestReferentialEntity.getRequestId(); } }
TapeLibraryContentAddressableStorage implements ContentAddressableStorage { @Override public String createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException { TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity; List<FileInTape> filesInTape = new ArrayList<>(); String readRequestId = GUIDFactory.newGUID().getId(); Map<String, TarLocation> tarLocationMap = new HashMap<>(); Set<String> archiveSet = new HashSet<>(); try { for (String objectName : objectsIds) { Optional<TapeObjectReferentialEntity> object = objectReferentialRepository.find(containerName, objectName); if (!object.isPresent()) { throw new ContentAddressableStorageNotFoundException( ErrorMessage.OBJECT_NOT_FOUND + containerName + "/" + objectName); } TapeLibraryObjectStorageLocation location = object.get().getLocation(); if (!(location instanceof TapeLibraryTarObjectStorageLocation)) { throw new UnsupportedOperationException("Object stored in tar. Not implemented yet"); } List<TarEntryDescription> tarEntryDescriptions = ((TapeLibraryTarObjectStorageLocation) location).getTarEntries(); if (tarEntryDescriptions == null || tarEntryDescriptions.isEmpty()) { throw new IllegalStateException( "empty TAR description for object : " + containerName + "/" + objectName); } for (TarEntryDescription o : tarEntryDescriptions) { archiveSet.add(o.getTarFileId()); String tarFileIdWithoutExtension = StringUtils.substringBeforeLast(o.getTarFileId(), "."); Path path = archiveOutputRetentionPolicy.get(o.getTarFileId()); if (null != path) { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.DISK); } else { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.TAPE); } } filesInTape.add(new FileInTape(objectName, object.get().getStorageId(), tarEntryDescriptions)); } tapeReadRequestReferentialEntity = new TapeReadRequestReferentialEntity(readRequestId, containerName, tarLocationMap, filesInTape); readRequestReferentialRepository.insert(tapeReadRequestReferentialEntity); for (String tarId : archiveSet) { Optional<TapeArchiveReferentialEntity> tapeLibraryTarReferentialEntity = archiveReferentialRepository.find(tarId); if (!tapeLibraryTarReferentialEntity.isPresent()) { throw new IllegalStateException("TAR information not found for tarId : " + tarId); } TapeLibraryArchiveStorageLocation tarLocation = tapeLibraryTarReferentialEntity.get().getLocation(); if (!(tarLocation instanceof TapeLibraryOnTapeArchiveStorageLocation)) { throw new UnsupportedOperationException("Tar file is not yet on tape."); } String tarIdWithoutExtension = StringUtils.substringBeforeLast(tarId, "."); if (tarLocationMap.get(tarIdWithoutExtension).equals(TarLocation.DISK)) { continue; } String tapeCode = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getTapeCode(); Integer filePosition = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getFilePosition(); String bucketId = getBucketByTapeCode(tapeCode); ReadOrder readOrder = new ReadOrder(readRequestId, tapeCode, filePosition, tarId, bucketId); readWriteQueue.addIfAbsent( Arrays.asList( new QueryCriteria(ReadOrder.FILE_NAME, tarId, QueryCriteriaOperator.EQ), new QueryCriteria(ReadOrder.MESSAGE_TYPE, QueueMessageType.ReadOrder.name(), QueryCriteriaOperator.EQ)), readOrder); } } catch (ObjectReferentialException | QueueException | ArchiveReferentialException | TapeCatalogException | ReadRequestReferentialException e) { throw new ContentAddressableStorageServerException( "Error on reading from tape"); } return tapeReadRequestReferentialEntity.getRequestId(); } TapeLibraryContentAddressableStorage(
        BasicFileStorage basicFileStorage,
        ObjectReferentialRepository objectReferentialRepository,
        ArchiveReferentialRepository archiveReferentialRepository,
        ReadRequestReferentialRepository readRequestReferentialRepository,
        FileBucketTarCreatorManager fileBucketTarCreatorManager,
        QueueRepository readWriteQueue, TapeCatalogService tapeCatalogService,
        String outputTarStorageFolder,
        ArchiveOutputRetentionPolicy archiveOutputRetentionPolicy); }
TapeLibraryContentAddressableStorage implements ContentAddressableStorage { @Override public String createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException { TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity; List<FileInTape> filesInTape = new ArrayList<>(); String readRequestId = GUIDFactory.newGUID().getId(); Map<String, TarLocation> tarLocationMap = new HashMap<>(); Set<String> archiveSet = new HashSet<>(); try { for (String objectName : objectsIds) { Optional<TapeObjectReferentialEntity> object = objectReferentialRepository.find(containerName, objectName); if (!object.isPresent()) { throw new ContentAddressableStorageNotFoundException( ErrorMessage.OBJECT_NOT_FOUND + containerName + "/" + objectName); } TapeLibraryObjectStorageLocation location = object.get().getLocation(); if (!(location instanceof TapeLibraryTarObjectStorageLocation)) { throw new UnsupportedOperationException("Object stored in tar. Not implemented yet"); } List<TarEntryDescription> tarEntryDescriptions = ((TapeLibraryTarObjectStorageLocation) location).getTarEntries(); if (tarEntryDescriptions == null || tarEntryDescriptions.isEmpty()) { throw new IllegalStateException( "empty TAR description for object : " + containerName + "/" + objectName); } for (TarEntryDescription o : tarEntryDescriptions) { archiveSet.add(o.getTarFileId()); String tarFileIdWithoutExtension = StringUtils.substringBeforeLast(o.getTarFileId(), "."); Path path = archiveOutputRetentionPolicy.get(o.getTarFileId()); if (null != path) { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.DISK); } else { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.TAPE); } } filesInTape.add(new FileInTape(objectName, object.get().getStorageId(), tarEntryDescriptions)); } tapeReadRequestReferentialEntity = new TapeReadRequestReferentialEntity(readRequestId, containerName, tarLocationMap, filesInTape); readRequestReferentialRepository.insert(tapeReadRequestReferentialEntity); for (String tarId : archiveSet) { Optional<TapeArchiveReferentialEntity> tapeLibraryTarReferentialEntity = archiveReferentialRepository.find(tarId); if (!tapeLibraryTarReferentialEntity.isPresent()) { throw new IllegalStateException("TAR information not found for tarId : " + tarId); } TapeLibraryArchiveStorageLocation tarLocation = tapeLibraryTarReferentialEntity.get().getLocation(); if (!(tarLocation instanceof TapeLibraryOnTapeArchiveStorageLocation)) { throw new UnsupportedOperationException("Tar file is not yet on tape."); } String tarIdWithoutExtension = StringUtils.substringBeforeLast(tarId, "."); if (tarLocationMap.get(tarIdWithoutExtension).equals(TarLocation.DISK)) { continue; } String tapeCode = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getTapeCode(); Integer filePosition = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getFilePosition(); String bucketId = getBucketByTapeCode(tapeCode); ReadOrder readOrder = new ReadOrder(readRequestId, tapeCode, filePosition, tarId, bucketId); readWriteQueue.addIfAbsent( Arrays.asList( new QueryCriteria(ReadOrder.FILE_NAME, tarId, QueryCriteriaOperator.EQ), new QueryCriteria(ReadOrder.MESSAGE_TYPE, QueueMessageType.ReadOrder.name(), QueryCriteriaOperator.EQ)), readOrder); } } catch (ObjectReferentialException | QueueException | ArchiveReferentialException | TapeCatalogException | ReadRequestReferentialException e) { throw new ContentAddressableStorageServerException( "Error on reading from tape"); } return tapeReadRequestReferentialEntity.getRequestId(); } TapeLibraryContentAddressableStorage(
        BasicFileStorage basicFileStorage,
        ObjectReferentialRepository objectReferentialRepository,
        ArchiveReferentialRepository archiveReferentialRepository,
        ReadRequestReferentialRepository readRequestReferentialRepository,
        FileBucketTarCreatorManager fileBucketTarCreatorManager,
        QueueRepository readWriteQueue, TapeCatalogService tapeCatalogService,
        String outputTarStorageFolder,
        ArchiveOutputRetentionPolicy archiveOutputRetentionPolicy); @Override void createContainer(String containerName); @Override boolean isExistingContainer(String containerName); @Override String putObject(String containerName, String objectName, InputStream stream, DigestType digestType,
        Long size); @Override ObjectContent getObject(String containerName, String objectName); @Override String createReadOrderRequest(String containerName, List<String> objectsIds); @Override void removeReadOrderRequest(String readRequestID); @Override void deleteObject(String containerName, String objectName); @Override boolean isExistingObject(String containerName, String objectName); @Override String getObjectDigest(String containerName, String objectName, DigestType algo, boolean noCache); @Override ContainerInformation getContainerInformation(String containerName); @Override MetadatasObject getObjectMetadata(String containerName, String objectName, boolean noCache); @Override void listContainer(String containerName, ObjectListingListener objectListingListener); @Override void close(); }
TapeLibraryContentAddressableStorage implements ContentAddressableStorage { @Override public String createReadOrderRequest(String containerName, List<String> objectsIds) throws ContentAddressableStorageServerException, ContentAddressableStorageNotFoundException { TapeReadRequestReferentialEntity tapeReadRequestReferentialEntity; List<FileInTape> filesInTape = new ArrayList<>(); String readRequestId = GUIDFactory.newGUID().getId(); Map<String, TarLocation> tarLocationMap = new HashMap<>(); Set<String> archiveSet = new HashSet<>(); try { for (String objectName : objectsIds) { Optional<TapeObjectReferentialEntity> object = objectReferentialRepository.find(containerName, objectName); if (!object.isPresent()) { throw new ContentAddressableStorageNotFoundException( ErrorMessage.OBJECT_NOT_FOUND + containerName + "/" + objectName); } TapeLibraryObjectStorageLocation location = object.get().getLocation(); if (!(location instanceof TapeLibraryTarObjectStorageLocation)) { throw new UnsupportedOperationException("Object stored in tar. Not implemented yet"); } List<TarEntryDescription> tarEntryDescriptions = ((TapeLibraryTarObjectStorageLocation) location).getTarEntries(); if (tarEntryDescriptions == null || tarEntryDescriptions.isEmpty()) { throw new IllegalStateException( "empty TAR description for object : " + containerName + "/" + objectName); } for (TarEntryDescription o : tarEntryDescriptions) { archiveSet.add(o.getTarFileId()); String tarFileIdWithoutExtension = StringUtils.substringBeforeLast(o.getTarFileId(), "."); Path path = archiveOutputRetentionPolicy.get(o.getTarFileId()); if (null != path) { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.DISK); } else { tarLocationMap.putIfAbsent(tarFileIdWithoutExtension, TarLocation.TAPE); } } filesInTape.add(new FileInTape(objectName, object.get().getStorageId(), tarEntryDescriptions)); } tapeReadRequestReferentialEntity = new TapeReadRequestReferentialEntity(readRequestId, containerName, tarLocationMap, filesInTape); readRequestReferentialRepository.insert(tapeReadRequestReferentialEntity); for (String tarId : archiveSet) { Optional<TapeArchiveReferentialEntity> tapeLibraryTarReferentialEntity = archiveReferentialRepository.find(tarId); if (!tapeLibraryTarReferentialEntity.isPresent()) { throw new IllegalStateException("TAR information not found for tarId : " + tarId); } TapeLibraryArchiveStorageLocation tarLocation = tapeLibraryTarReferentialEntity.get().getLocation(); if (!(tarLocation instanceof TapeLibraryOnTapeArchiveStorageLocation)) { throw new UnsupportedOperationException("Tar file is not yet on tape."); } String tarIdWithoutExtension = StringUtils.substringBeforeLast(tarId, "."); if (tarLocationMap.get(tarIdWithoutExtension).equals(TarLocation.DISK)) { continue; } String tapeCode = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getTapeCode(); Integer filePosition = ((TapeLibraryOnTapeArchiveStorageLocation) tarLocation).getFilePosition(); String bucketId = getBucketByTapeCode(tapeCode); ReadOrder readOrder = new ReadOrder(readRequestId, tapeCode, filePosition, tarId, bucketId); readWriteQueue.addIfAbsent( Arrays.asList( new QueryCriteria(ReadOrder.FILE_NAME, tarId, QueryCriteriaOperator.EQ), new QueryCriteria(ReadOrder.MESSAGE_TYPE, QueueMessageType.ReadOrder.name(), QueryCriteriaOperator.EQ)), readOrder); } } catch (ObjectReferentialException | QueueException | ArchiveReferentialException | TapeCatalogException | ReadRequestReferentialException e) { throw new ContentAddressableStorageServerException( "Error on reading from tape"); } return tapeReadRequestReferentialEntity.getRequestId(); } TapeLibraryContentAddressableStorage(
        BasicFileStorage basicFileStorage,
        ObjectReferentialRepository objectReferentialRepository,
        ArchiveReferentialRepository archiveReferentialRepository,
        ReadRequestReferentialRepository readRequestReferentialRepository,
        FileBucketTarCreatorManager fileBucketTarCreatorManager,
        QueueRepository readWriteQueue, TapeCatalogService tapeCatalogService,
        String outputTarStorageFolder,
        ArchiveOutputRetentionPolicy archiveOutputRetentionPolicy); @Override void createContainer(String containerName); @Override boolean isExistingContainer(String containerName); @Override String putObject(String containerName, String objectName, InputStream stream, DigestType digestType,
        Long size); @Override ObjectContent getObject(String containerName, String objectName); @Override String createReadOrderRequest(String containerName, List<String> objectsIds); @Override void removeReadOrderRequest(String readRequestID); @Override void deleteObject(String containerName, String objectName); @Override boolean isExistingObject(String containerName, String objectName); @Override String getObjectDigest(String containerName, String objectName, DigestType algo, boolean noCache); @Override ContainerInformation getContainerInformation(String containerName); @Override MetadatasObject getObjectMetadata(String containerName, String objectName, boolean noCache); @Override void listContainer(String containerName, ObjectListingListener objectListingListener); @Override void close();  }