Interface JobSchedulerStore

All Superinterfaces:
org.apache.activemq.Service
All Known Implementing Classes:
InMemoryJobSchedulerStore

public interface JobSchedulerStore extends org.apache.activemq.Service
A Job Scheduler Store interface use to manage delay processing of Messaging related jobs.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the location where the Job Scheduler will write the persistent data used to preserve and recover scheduled Jobs.
    Returns the JobScheduler instance identified by the given name.
    boolean
    Removes the named JobScheduler if it exists, purging all scheduled messages assigned to it.
    void
    setDirectory(File directory)
    Sets the directory where persistent store data will be written.
    long
    The size of the current store on disk if the store utilizes a disk based store mechanism.

    Methods inherited from interface org.apache.activemq.Service

    start, stop
  • Method Details

    • getDirectory

      File getDirectory()
      Gets the location where the Job Scheduler will write the persistent data used to preserve and recover scheduled Jobs. If the scheduler implementation does not utilize a file system based store this method returns null.
      Returns:
      the directory where persistent store data is written.
    • setDirectory

      void setDirectory(File directory)
      Sets the directory where persistent store data will be written. This method must be called before the scheduler store is started to have any effect.
      Parameters:
      directory - The directory where the job scheduler store is to be located.
    • size

      long size()
      The size of the current store on disk if the store utilizes a disk based store mechanism.
      Returns:
      the current store size on disk.
    • getJobScheduler

      JobScheduler getJobScheduler(String name) throws Exception
      Returns the JobScheduler instance identified by the given name.
      Parameters:
      name - the name of the JobScheduler instance to lookup.
      Returns:
      the named JobScheduler or null if none exists with the given name.
      Throws:
      Exception - if an error occurs while loading the named scheduler.
    • removeJobScheduler

      boolean removeJobScheduler(String name) throws Exception
      Removes the named JobScheduler if it exists, purging all scheduled messages assigned to it.
      Parameters:
      name - the name of the scheduler instance to remove.
      Returns:
      true if there was a scheduler with the given name to remove.
      Throws:
      Exception - if an error occurs while removing the scheduler.