SEARCH-1949 Add cascade enabled check to interface.

This commit is contained in:
Tom Page
2020-01-24 18:11:35 +00:00
parent 12cf62abb8
commit f2966a73ab
3 changed files with 10 additions and 6 deletions
@@ -181,4 +181,11 @@ public interface InformationServer extends InformationServerCollectionProvider
String getBaseUrl();
void flushContentStore() throws IOException;
/**
* Check if cascade tracking is enabled.
*
* @return true if cascade tracking is enabled (note that this is the default behaviour if not specified in the properties file).
*/
boolean cascadeTrackingEnabled();
}
@@ -481,11 +481,8 @@ public class SolrInformationServer implements InformationServer
return this.adminHandler;
}
/**
* Check if cascade tracking is enabled.
*
* @return true if cascade tracking is enabled (note that this is the default behaviour if not specified in the properties file).
*/
/** {@inheritDoc} */
@Override
public boolean cascadeTrackingEnabled()
{
String cascadeTrackerEnabledProp = ofNullable((String) props.get(CASCADE_TRACKER_ENABLED)).orElse("true");
@@ -110,7 +110,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
transactionDocsBatchSize = Integer.parseInt(p.getProperty("alfresco.transactionDocsBatchSize", "100"));
nodeBatchSize = Integer.parseInt(p.getProperty("alfresco.nodeBatchSize", "10"));
threadHandler = new ThreadHandler(p, coreName, "MetadataTracker");
cascadeTrackerEnabled = ((SolrInformationServer) informationServer).cascadeTrackingEnabled();
cascadeTrackerEnabled = informationServer.cascadeTrackingEnabled();
// In order to apply performance optimizations, checking the availability of Repo Web Scripts is required.
// As these services are available from ACS 6.2