Package org.alfresco.solr.tracker
Class SolrTrackerScheduler
java.lang.Object
org.alfresco.solr.tracker.SolrTrackerScheduler
This is a decorator of the Quartz Scheduler object to add Solr-specific functionality.
- Author:
- Ahmed Owian
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerprotected org.quartz.Schedulerstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteJobForTrackerInstance(String coreName, Tracker tracker) Delete a Tracker Job ONLY if its exactly the same tracker instance that was passed in.voiddeleteTrackerJob(String coreName, Tracker tracker) voiddeleteTrackerJobs(String coreName, Collection<Tracker> trackers) protected StringgetJobName(Tracker tracker, String coreName) intbooleanvoidpauseAll()voidschedule(Tracker tracker, String coreName, Properties props) Schedules individual trackers based on the solrcore properties.voidshutdown()
-
Field Details
-
SOLR_JOB_GROUP
- See Also:
-
log
protected static final org.slf4j.Logger log -
scheduler
protected org.quartz.Scheduler scheduler
-
-
Constructor Details
-
SolrTrackerScheduler
-
-
Method Details
-
schedule
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
-
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
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
- 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
-