Class SolrTrackerScheduler

java.lang.Object
org.alfresco.solr.tracker.SolrTrackerScheduler

public class SolrTrackerScheduler extends Object
This is a decorator of the Quartz Scheduler object to add Solr-specific functionality.
Author:
Ahmed Owian
  • Field Details

    • SOLR_JOB_GROUP

      public static final String SOLR_JOB_GROUP
      See Also:
    • log

      protected static final org.slf4j.Logger log
    • scheduler

      protected org.quartz.Scheduler scheduler
  • Constructor Details

  • Method Details

    • schedule

      public void schedule(Tracker tracker, String coreName, Properties props)
      Schedules individual trackers based on the solrcore properties.
      Parameters:
      tracker - the tracker to bo scheduled.
      coreName - the owning core name.
      props - the core properties.
    • getJobName

      protected String getJobName(Tracker tracker, String coreName)
    • shutdown

      public void shutdown() throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException
    • deleteTrackerJobs

      public void deleteTrackerJobs(String coreName, Collection<Tracker> trackers) throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException
    • deleteJobForTrackerInstance

      public void deleteJobForTrackerInstance(String coreName, Tracker tracker)
      Delete a Tracker Job ONLY if its exactly the same tracker instance that was passed in. In theory more than one instance of a core can exist with the same core name but the scheduler stores jobs using the core name as a unique key (even though it may not be unique). This method gets the tracker instance associated with the Job and compares to see if its identical to the instance that is passed in. If they are identical then the job is deleted. Otherwise, another core (of the same name) scheduled this job, so its left alone.
      Parameters:
      coreName - the core name.
      tracker - Specific instance of a tracker
    • deleteTrackerJob

      public void deleteTrackerJob(String coreName, Tracker tracker) throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException
    • isShutdown

      public boolean isShutdown() throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException
    • pauseAll

      public void pauseAll() throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException
    • getJobsCount

      public int getJobsCount() throws org.quartz.SchedulerException
      Throws:
      org.quartz.SchedulerException