Package org.alfresco.solr.lifecycle
Class SolrCoreLoadRegistration
- java.lang.Object
-
- org.alfresco.solr.lifecycle.SolrCoreLoadRegistration
-
public class SolrCoreLoadRegistration extends Object
Deals with core registration when the core is loaded.- Author:
- Gethin James
-
-
Constructor Summary
Constructors Constructor Description SolrCoreLoadRegistration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidregisterForCore(AlfrescoCoreAdminHandler adminHandler, org.apache.solr.core.CoreContainer coreContainer, org.apache.solr.core.SolrCore core, String coreName)Registers with the admin handler the information server and the trackers.static voidshutdownTrackers(String coreName, Collection<Tracker> coreTrackers, SolrTrackerScheduler scheduler)Shuts down the trackers for a core.
-
-
-
Method Detail
-
registerForCore
public static void registerForCore(AlfrescoCoreAdminHandler adminHandler, org.apache.solr.core.CoreContainer coreContainer, org.apache.solr.core.SolrCore core, String coreName)
Registers with the admin handler the information server and the trackers.
-
shutdownTrackers
public static void shutdownTrackers(String coreName, Collection<Tracker> coreTrackers, SolrTrackerScheduler scheduler)
Shuts down the trackers for a core. The trackers are only deleted from the scheduler if they are the exact same instance of the Tracker class passed into this method. For example, you could have 2 cores of the same name and have the trackers registered with the scheduler BUT the scheduler only keys by core name. The Collections passed into this method are only removed from the scheduler if the instances are == (equal). See scheduler.deleteJobForTrackerInstance() Trackers are not removed from the registry because the registry only keys by core name; its possible to have multiple cores of the same name running. Left over trackers in the registry are cleaned up by the CoreContainer shutdown, that happens in the the AlfrescoCoreAdminHandler.shutdown(). - Parameters:
coreName- The name of the corecoreTrackers- A collection of trackersscheduler- The scheduler
-
-