Package org.alfresco.solr.tracker
Class CommitTracker
- java.lang.Object
-
- org.alfresco.solr.tracker.AbstractTracker
-
- org.alfresco.solr.tracker.CommitTracker
-
- All Implemented Interfaces:
Tracker
public class CommitTracker extends AbstractTracker
- Author:
- Joel Bernstein
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.solr.tracker.Tracker
Tracker.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOGGER-
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 CommitTracker(Properties p, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer, List<Tracker> trackers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoRollback()protected voiddoTrack(String iterationId)Subclasses must implement behaviour that completes the following steps, in order: Purge Reindex Index Track repositoryintgetRollbackCount()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()voidmaintenance()-
Methods inherited from class org.alfresco.solr.tracker.AbstractTracker
checkNode, getDocRouter, getProps, getRollback, getRollbackCausedBy, getTrackerState, getType, invalidateState, isAlreadyInShutDownMode, setRollback, setShutdown, shutdown, track
-
-
-
-
Constructor Detail
-
CommitTracker
public CommitTracker(Properties p, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer, List<Tracker> trackers)
-
-
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()
-
getRollbackCount
public int getRollbackCount()
-
doTrack
protected void doTrack(String iterationId) throws Throwable
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:
Throwable
-
doRollback
protected void doRollback()
-
-