Class LegacyStoreReplayer


  • public class LegacyStoreReplayer
    extends Object
    Used to upgrade a Legacy Job Scheduler store to the latest version this class loads a found legacy scheduler store and generates new add commands for all jobs currently in the store.
    • Constructor Detail

      • LegacyStoreReplayer

        public LegacyStoreReplayer​(File directory)
        Creates a new Legacy Store Replayer with the given target store
        Parameters:
        directory -
    • Method Detail

      • load

        public void load()
                  throws IOException
        Loads the legacy store and prepares it for replay into a newer Store instance.
        Throws:
        IOException - if an error occurs while reading in the legacy store.
      • unload

        public void unload()
                    throws IOException
        Unloads a previously loaded legacy store to release any resources associated with it. Once a store is unloaded it cannot be replayed again until it has been reloaded.
        Throws:
        IOException
      • startReplay

        public void startReplay​(JobSchedulerStoreImpl targetStore)
                         throws IOException
        Performs a replay of scheduled jobs into the target JobSchedulerStore.
        Parameters:
        targetStore - The JobSchedulerStore that will receive the replay events from the legacy store.
        Throws:
        IOException - if an error occurs during replay of the legacy store.