Class DataStoreCacheUpgradeUtils


  • public class DataStoreCacheUpgradeUtils
    extends java.lang.Object
    Utility methods to upgrade Old DataStore cache CachingDataStore.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void moveDownloadCache​(java.io.File path)
      Move the DataStore downloaded cache files to the appropriate folder used by the new cache FileCache
      static void movePendingUploadsToStaging​(java.io.File homeDir, java.io.File path, boolean deleteMap)
      Move the pending uploads read from the de-serialized map to the appropriate directory used by the UploadStagingCache.
      static void upgrade​(java.io.File homeDir, java.io.File path, boolean moveCache, boolean deleteMap)
      Upgrades the CachingDataStore.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataStoreCacheUpgradeUtils

        public DataStoreCacheUpgradeUtils()
    • Method Detail

      • moveDownloadCache

        public static void moveDownloadCache​(java.io.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​(java.io.File homeDir,
                                                       java.io.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​(java.io.File homeDir,
                                   java.io.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