@startuml
skinparam  sequence  {
	ArrowColor DeepSkyBlue
	ActorBorderColor DeepSkyBlue
	LifeLineBorderColor blue
	ParticipantBorderColor DeepSkyBlue
	ParticipantBackgroundColor white
}

 [-> Scheduler : Initialise on first core load

 ...
 Scheduler -> AsyncContentTracker: Run
 activate AsyncContentTracker
 loop  
    AsyncContentTracker -> AsyncContentTracker: aquireRunLock
    activate AsyncContentTracker
    AsyncContentTracker -> AsyncContentTracker: getTrackerState
    AsyncContentTracker -> ContentConsumer: readMessages
    participant ContentConsumer  #green
    activate ContentConsumer  #Green
    AsyncContentTracker <- ContentConsumer: return docList
    deactivate ContentConsumer
    participant SolrInformationServer #FFBBBB
    AsyncContentTracker -> SolrInformationServer: getDocsWithUncleanContent
    activate SolrInformationServer  #FFBBBB
    SolrInformationServer -> SolrInformationServer: cleanContentCache (periodically)
    participant SolrIndexSearcher  #aqua
    activate SolrIndexSearcher #aqua
    SolrInformationServer -> SolrIndexSearcher: search (Search unclean documents)
    SolrIndexSearcher -> SolrInformationServer: result docList
    deactivate SolrIndexSearcher
    AsyncContentTracker <- SolrInformationServer: result docList
    deactivate SolrInformationServer
    loop content
       activate ContentIndexWorkerRunnable
       AsyncContentTracker -> ContentIndexWorkerRunnable: load docList
       ContentIndexWorkerRunnable -> ContentIndexWorkerRunnable: doWork
       activate SolrInformationServer #FFBBBB
       activate ContentIndexWorkerRunnable #lightgrey
       ContentIndexWorkerRunnable -> SolrInformationServer: updateContentToIndexAndCache
       SolrInformationServer -> SolrContentStore: retrieveDocFromSolrContentStore
       activate SolrContentStore
       SolrContentStore -> SolrInformationServer
       deactivate SolrContentStore
       SolrInformationServer -> SolrInformationServer: addContentToDoc
       participant SharedFileStoreClient #green
       SolrInformationServer -> SharedFileStoreClient: getTextContent
       activate SharedFileStoreClient #green
       SolrInformationServer <- SharedFileStoreClient: return text
       deactivate SharedFileStoreClient
       activate SolrInformationServer #DarkSalmon
       SolrInformationServer -> SolrInformationServer:addContentPropertyMetadata 
       SolrInformationServer -> SolrInformationServer:fingerprint
       SolrInformationServer -> SolrInformationServer:addField
       SolrInformationServer -> SolrInformationServer:markFTSStatus
       SolrInformationServer ->o  SolrContentStore:storeDocOnSolrContentStore
       participant UpdateRequestProcessor  #aqua
       SolrInformationServer -> UpdateRequestProcessor:processAdd(addDocCmd)
       deactivate ContentIndexWorkerRunnable
       deactivate ContentIndexWorkerRunnable
       deactivate SolrInformationServer
       deactivate SolrInformationServer
    end
    loop contentNew
    	AsyncContentTracker -> ContentProducer:produceRequest
    	AsyncContentTracker -> AsyncContentTracker:markFTSStatus (dirty)
    end
end    
 AsyncContentTracker -> Scheduler
 deactivate AsyncContentTracker
...
 center footer Copyright 2019 Alfresco Software Inc
 
 @enduml