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
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
FieldsFields inherited from class org.alfresco.solr.tracker.AbstractTracker
client, coreName, props, rollback, rollbackCausedBy, shardCount, shardInstance, shardKey, shardProperty, state, trackerId, transformContent, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedActivatableTracker(Properties properties, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer, Tracker.Type type) protected -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCleans up the scheduled maintenance work collected by this tracker.final voiddisable()Disables this tracker instance.final voidenable()Enables this tracker instance.booleanbooleanprotected voidlogAndClear(Collection<Long> values, 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, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.solr.tracker.Tracker
hasMaintenance, maintenance
-
Field Details
-
isEnabled
-
-
Constructor Details
-
ActivatableTracker
-
ActivatableTracker
protected ActivatableTracker(Properties properties, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer, Tracker.Type type)
-
-
Method Details
-
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
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.
-