Package fr.gouv.vitam.storage.offers.migration

# Class SwiftMigrationService

java.lang.Object
fr.gouv.vitam.storage.offers.migration.SwiftMigrationService

public class SwiftMigrationService extends Object
Handles multiple inconsistencies in large object handling in previous Swift V2 invalid input: '&' V3 implementations. - Very large objects (> 36 GB) segments naming might cause invalid digests : "{objectName}/1", "{objectName}/2"..., "{objectName}/10" should be renaming to "{objectName}/00000001", "{objectName}/00000002"..., "{objectName}/00000010" in order to ensure lexical sorting consistency - Large objects (> 4 GB) manifest does not have the appropriate X-Object-Manifest header. Such manifest will be considered an empty object. - Eliminated large object (> 4 GB) still have segments not deleted. This migration service ensures : - Orphan object segments without a parent manifest are deleted - Object segments are properly left-padded with '0's (copy new segment from old segment, check digests invalid input: '&' delete old segment) - Manifest object is properly written (size, digest and appropriate X-Object-Manifest/X-Object-Meta-Digest/X-Object-Meta-Digest-Type headers)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SwiftMigrationService(Supplier<org.openstack4j.api.OSClient> osClient)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasMigrationSucceeded()`
  `boolean`
  `isMigrationInProgress()`
  `boolean`
  `tryStartMigration(SwiftMigrationMode swiftMigrationMode)`

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

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

- ## Constructor Details

  - ### SwiftMigrationService

    public SwiftMigrationService(Supplier<org.openstack4j.api.OSClient> osClient)

- ## Method Details

  - ### tryStartMigration

    public boolean tryStartMigration(SwiftMigrationMode swiftMigrationMode)

  - ### isMigrationInProgress

    public boolean isMigrationInProgress()

  - ### hasMigrationSucceeded

    public boolean hasMigrationSucceeded()