Package org.alfresco.solr.tracker
Class AclTracker
- java.lang.Object
-
- org.alfresco.solr.tracker.AbstractTracker
-
- org.alfresco.solr.tracker.ActivatableTracker
-
- org.alfresco.solr.tracker.AclTracker
-
- All Implemented Interfaces:
Tracker
public class AclTracker extends ActivatableTracker
Multithreaded ACLTrackerimplementation.- Author:
- Matt Ward
-
-
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.Loggerlog-
Fields inherited from class org.alfresco.solr.tracker.ActivatableTracker
isEnabled
-
Fields inherited from class org.alfresco.solr.tracker.AbstractTracker
client, coreName, logger, props, rollback, shardCount, shardInstance, shardKey, shardProperty, state, trackerId, transformContent, type
-
-
Constructor Summary
Constructors Constructor Description AclTracker(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 voidaddAclChangeSetToIndex(Long aclChangeSetToIndex)voidaddAclChangeSetToPurge(Long aclChangeSetToPurge)voidaddAclChangeSetToReindex(Long aclChangeSetToReindex)voidaddAclToIndex(Long aclToIndex)voidaddAclToPurge(Long aclToPurge)voidaddAclToReindex(Long aclToReindex)org.alfresco.solr.AclReportcheckAcl(Long aclid)org.alfresco.solr.tracker.IndexHealthReportcheckIndex(Long toTx, Long toAclTx, Long fromTime, Long toTime)protected voidclearScheduledMaintenanceWork()Cleans up the scheduled maintenance work collected by this tracker.protected voiddoTrack(String iterationId)Subclasses must implement behaviour that completes the following steps, in order: Purge Reindex Index Track repositoryList<Long>getAclsForDbAclTransaction(Long acltxid)protected LonggetChangeSetFromCommitTime(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.AclChangeSet> changeSetsFound, long lastGoodChangeSetCommitTimeInIndex)List<org.alfresco.solr.client.Node>getFullNodesForDbTransaction(Long txid)protected org.alfresco.solr.client.AclChangeSetsgetSomeAclChangeSets(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.AclChangeSet> changeSetsFound, Long fromCommitTime, long timeStep, int maxResults, long endTime)booleanhasMaintenance()protected voidindexAcl(List<org.alfresco.solr.client.AclReaders> aclReaderList, boolean overwrite)protected voidindexAclChangeSets()protected voidindexAcls()voidinvalidateState()voidmaintenance()protected voidpurgeAclChangeSets()protected voidpurgeAcls()protected voidreindexAclChangeSets()protected voidreindexAcls()protected voidtrackAclChangeSets()protected voidtrackRepository()-
Methods inherited from class org.alfresco.solr.tracker.ActivatableTracker
disable, enable, isDisabled, isEnabled, logAndClear, track
-
Methods inherited from class org.alfresco.solr.tracker.AbstractTracker
checkNode, getDocRouter, getProps, getRollback, getTrackerState, getType, getWriteLock, isAlreadyInShutDownMode, setRollback, setShutdown, shutdown
-
-
-
-
Constructor Detail
-
AclTracker
public AclTracker(Properties p, org.alfresco.solr.client.SOLRAPIClient client, String coreName, InformationServer informationServer)
-
-
Method Detail
-
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
-
hasMaintenance
public boolean hasMaintenance()
-
indexAclChangeSets
protected void indexAclChangeSets() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
indexAcls
protected void indexAcls() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
reindexAclChangeSets
protected void reindexAclChangeSets() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
reindexAcls
protected void reindexAcls() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
purgeAclChangeSets
protected void purgeAclChangeSets() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
purgeAcls
protected void purgeAcls() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
addAclChangeSetToReindex
public void addAclChangeSetToReindex(Long aclChangeSetToReindex)
-
addAclChangeSetToIndex
public void addAclChangeSetToIndex(Long aclChangeSetToIndex)
-
addAclChangeSetToPurge
public void addAclChangeSetToPurge(Long aclChangeSetToPurge)
-
addAclToReindex
public void addAclToReindex(Long aclToReindex)
-
addAclToIndex
public void addAclToIndex(Long aclToIndex)
-
addAclToPurge
public void addAclToPurge(Long aclToPurge)
-
clearScheduledMaintenanceWork
protected void clearScheduledMaintenanceWork()
Description copied from class:ActivatableTrackerCleans up the scheduled maintenance work collected by this tracker.- Overrides:
clearScheduledMaintenanceWorkin classActivatableTracker
-
trackRepository
protected void trackRepository() throws IOException, org.alfresco.httpclient.AuthenticationException, org.json.JSONException- Throws:
IOExceptionorg.alfresco.httpclient.AuthenticationExceptionorg.json.JSONException
-
getChangeSetFromCommitTime
protected Long getChangeSetFromCommitTime(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.AclChangeSet> changeSetsFound, long lastGoodChangeSetCommitTimeInIndex)
- Parameters:
changeSetsFound- BoundedDequelastGoodChangeSetCommitTimeInIndex- long- Returns:
- Long
-
getSomeAclChangeSets
protected org.alfresco.solr.client.AclChangeSets getSomeAclChangeSets(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.AclChangeSet> changeSetsFound, Long fromCommitTime, long timeStep, int maxResults, long endTime) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
indexAcl
protected void indexAcl(List<org.alfresco.solr.client.AclReaders> aclReaderList, boolean overwrite) throws IOException
- Parameters:
aclReaderList- Listoverwrite- boolean- Throws:
IOException
-
checkIndex
public org.alfresco.solr.tracker.IndexHealthReport checkIndex(Long toTx, Long toAclTx, Long fromTime, Long toTime) throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException
- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
getFullNodesForDbTransaction
public List<org.alfresco.solr.client.Node> getFullNodesForDbTransaction(Long txid)
-
getAclsForDbAclTransaction
public List<Long> getAclsForDbAclTransaction(Long acltxid)
- Parameters:
acltxid- Long- Returns:
- List
-
checkAcl
public org.alfresco.solr.AclReport checkAcl(Long aclid)
-
trackAclChangeSets
protected void trackAclChangeSets() throws org.alfresco.httpclient.AuthenticationException, IOException, org.json.JSONException- Throws:
org.alfresco.httpclient.AuthenticationExceptionIOExceptionorg.json.JSONException
-
invalidateState
public void invalidateState()
- Specified by:
invalidateStatein interfaceTracker- Overrides:
invalidateStatein classAbstractTracker
-
-