Class LegacyStoreReplayer

java.lang.Object
org.apache.activemq.store.kahadb.scheduler.legacy.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 Summary

    Constructors
    Constructor
    Description
    Creates a new Legacy Store Replayer with the given target store
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Loads the legacy store and prepares it for replay into a newer Store instance.
    void
    Performs a replay of scheduled jobs into the target JobSchedulerStore.
    void
    Unloads a previously loaded legacy store to release any resources associated with it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LegacyStoreReplayer

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

    • 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.