Class SolrTrackerScheduler


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

      • log

        protected static final org.slf4j.Logger log
      • scheduler

        protected org.quartz.Scheduler scheduler
    • Method Detail

      • schedule

        public void schedule​(Tracker tracker,
                             java.lang.String coreName,
                             java.util.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 java.lang.String getJobName​(Tracker tracker,
                                              java.lang.String coreName)
      • shutdown

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

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

        public void deleteJobForTrackerInstance​(java.lang.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​(java.lang.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