Package org.alfresco.solr.tracker
Class ActivatableTracker
- java.lang.Object
-
- org.alfresco.solr.tracker.AbstractTracker
-
- org.alfresco.solr.tracker.ActivatableTracker
-
- All Implemented Interfaces:
Tracker
- Direct Known Subclasses:
AclTracker,CascadeTracker,ContentTracker,MetadataTracker
public abstract class ActivatableTracker extends AbstractTracker
Supertype layer for trackers that can be enabled/disabled.
-
-
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 java.util.concurrent.atomic.AtomicBooleanisEnabled-
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 Modifier Constructor Description protectedActivatableTracker(java.util.Properties properties, org.alfresco.solr.client.SOLRAPIClient client, java.lang.String coreName, InformationServer informationServer, Tracker.Type type)protectedActivatableTracker(Tracker.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearScheduledMaintenanceWork()Cleans up the scheduled maintenance work collected by this tracker.voiddisable()Disables this tracker instance.voidenable()Enables this tracker instance.booleanisDisabled()booleanisEnabled()protected voidlogAndClear(java.util.Collection<java.lang.Long> values, java.lang.String kind)Logs out the content of the input collection.voidtrack()Template method - subclasses must implement theTracker-specific indexing by implementing the abstract methodAbstractTracker.doTrack(String).-
Methods inherited from class org.alfresco.solr.tracker.AbstractTracker
checkNode, doTrack, getDocRouter, getProps, getRollback, getRollbackCausedBy, getRunLock, getTrackerState, getType, getWriteLock, invalidateState, isAlreadyInShutDownMode, setRollback, setShutdown, shutdown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.solr.tracker.Tracker
hasMaintenance, maintenance
-
-
-
-
Constructor Detail
-
ActivatableTracker
protected ActivatableTracker(Tracker.Type type)
-
ActivatableTracker
protected ActivatableTracker(java.util.Properties properties, org.alfresco.solr.client.SOLRAPIClient client, java.lang.String coreName, InformationServer informationServer, Tracker.Type type)
-
-
Method Detail
-
disable
public final void disable()
Disables this tracker instance.
-
enable
public final void enable()
Enables this tracker instance.
-
track
public void track()
Description copied from class:AbstractTrackerTemplate method - subclasses must implement theTracker-specific indexing by implementing the abstract methodAbstractTracker.doTrack(String).- Specified by:
trackin interfaceTracker- Overrides:
trackin classAbstractTracker
-
isEnabled
public boolean isEnabled()
-
isDisabled
public boolean isDisabled()
-
clearScheduledMaintenanceWork
protected void clearScheduledMaintenanceWork()
Cleans up the scheduled maintenance work collected by this tracker.
-
logAndClear
protected void logAndClear(java.util.Collection<java.lang.Long> values, java.lang.String kind)Logs out the content of the input collection.- Parameters:
values- the collection which (in case is not empty) contains the identifiers (e.g. txid, aclid) the system is going to clear.kind- the kind of identifier (e.g. Transaction, Node ID, ACL ID) in the input collection.
-
-