Class DataStoreCacheUpgradeUtils


  • public class DataStoreCacheUpgradeUtils
    extends Object
    Utility methods to upgrade Old DataStore cache CachingDataStore.
    • Constructor Detail

      • DataStoreCacheUpgradeUtils

        public DataStoreCacheUpgradeUtils()
    • Method Detail

      • moveDownloadCache

        public static void moveDownloadCache​(File path)
        Move the DataStore downloaded cache files to the appropriate folder used by the new cache FileCache
        Parameters:
        path - the root of the datastore
      • movePendingUploadsToStaging

        public static void movePendingUploadsToStaging​(File homeDir,
                                                       File path,
                                                       boolean deleteMap)
        Move the pending uploads read from the de-serialized map to the appropriate directory used by the UploadStagingCache.
        Parameters:
        homeDir - the repository home directory
        path - the root of the datastore
        deleteMap - flag indicating whether to delete the pending upload map after upgrade
      • upgrade

        public static void upgrade​(File homeDir,
                                   File path,
                                   boolean moveCache,
                                   boolean deleteMap)
        Upgrades the CachingDataStore.
        Parameters:
        homeDir - the repository home directory
        path - the root of the datastore
        moveCache - flag whether to move the downloaded cache files
        deleteMap - flag indicating whether to delete the pending upload map after upgrade