Package org.alfresco.solr.tracker
Class ModelTracker
- java.lang.Object
-
- org.alfresco.solr.tracker.AbstractTracker
-
- org.alfresco.solr.tracker.ModelTracker
-
- All Implemented Interfaces:
Tracker
public class ModelTracker extends AbstractTracker
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.solr.tracker.Tracker
Tracker.Type
-
-
Field Summary
-
Fields inherited from class org.alfresco.solr.tracker.AbstractTracker
client, coreName, props, rollback, rollbackCausedBy, shardCount, shardInstance, shardKey, shardProperty, state, trackerId, transformContent, type
-
-
Constructor Summary
Constructors Constructor Description ModelTracker(String solrHome, Properties p, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoTrack(String iterationId)Subclasses must implement behaviour that completes the following steps, in order: Purge Reindex Index Track repositoryvoidensureFirstModelSync()SemaphoregetRunLock()Trackers implementing this method should decide if the Run Lock is applied globally for every Tracker Thread (static) or locally for each running ThreadSemaphoregetWriteLock()Trackers implementing this method should decide if the Write Lock is applied globally for every Tracker Thread (static) or locally for each running ThreadbooleanhasMaintenance()booleanhasModels()voidmaintenance()voidtrackModels(boolean onlyFirstTime)-
Methods inherited from class org.alfresco.solr.tracker.AbstractTracker
checkNode, getDocRouter, getProps, getRollback, getRollbackCausedBy, getTrackerState, getType, invalidateState, isAlreadyInShutDownMode, setRollback, setShutdown, shutdown, track
-
-
-
-
Constructor Detail
-
ModelTracker
public ModelTracker(String solrHome, Properties p, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer)
-
-
Method Detail
-
getWriteLock
public Semaphore getWriteLock()
Description copied from class:AbstractTrackerTrackers implementing this method should decide if the Write Lock is applied globally for every Tracker Thread (static) or locally for each running Thread- Specified by:
getWriteLockin interfaceTracker- Specified by:
getWriteLockin classAbstractTracker
-
getRunLock
public Semaphore getRunLock()
Description copied from class:AbstractTrackerTrackers implementing this method should decide if the Run Lock is applied globally for every Tracker Thread (static) or locally for each running Thread- Specified by:
getRunLockin classAbstractTracker
-
hasMaintenance
public boolean hasMaintenance()
-
maintenance
public void maintenance()
-
doTrack
protected void doTrack(String iterationId) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
Description copied from class:AbstractTrackerSubclasses must implement behaviour that completes the following steps, in order:- Purge
- Reindex
- Index
- Track repository
- Specified by:
doTrackin classAbstractTracker- Parameters:
iterationId- an identifier which is uniquely associated with a given iteration.- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
trackModels
public void trackModels(boolean onlyFirstTime) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
ensureFirstModelSync
public void ensureFirstModelSync()
-
hasModels
public boolean hasModels()
-
-