Class MetadataTracker

    • Field Detail

      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • MetadataTracker

        public MetadataTracker​(Properties p,
                               org.alfresco.solr.client.SOLRAPIClient client,
                               String coreName,
                               InformationServer informationServer,
                               boolean checkRepoServicesAvailability)
        MetadataTracker constructor
        Parameters:
        p - includes SOLR core properties (from environment variables and properties file)
        client - Alfresco Repository http client
        coreName - Name of the SOLR Core (alfresco, archive)
        informationServer - SOLR Information Server
        checkRepoServicesAvailability - is true if Repo Services availability needs to be checked
    • Method Detail

      • doTrack

        protected void doTrack​(String iterationId)
                        throws org.alfresco.httpclient.AuthenticationException,
                               IOException,
                               org.json.JSONException,
                               org.apache.commons.codec.EncoderException
        Description copied from class: AbstractTracker
        Subclasses must implement behaviour that completes the following steps, in order:
        1. Purge
        2. Reindex
        3. Index
        4. Track repository
        Specified by:
        doTrack in class AbstractTracker
        Parameters:
        iterationId - an identifier which is uniquely associated with a given iteration.
        Throws:
        org.alfresco.httpclient.AuthenticationException
        IOException
        org.json.JSONException
        org.apache.commons.codec.EncoderException
      • hasMaintenance

        public boolean hasMaintenance()
      • getTxFromCommitTime

        protected Long getTxFromCommitTime​(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.Transaction> txnsFound,
                                           long lastGoodTxCommitTimeInIndex)
      • getSomeTransactions

        protected org.alfresco.solr.client.Transactions getSomeTransactions​(org.alfresco.solr.BoundedDeque<org.alfresco.solr.client.Transaction> txnsFound,
                                                                            Long fromCommitTime,
                                                                            long timeStep,
                                                                            int maxResults,
                                                                            long endTime)
                                                                     throws org.alfresco.httpclient.AuthenticationException,
                                                                            IOException,
                                                                            org.json.JSONException,
                                                                            org.apache.commons.codec.EncoderException,
                                                                            NoSuchMethodException
        Throws:
        org.alfresco.httpclient.AuthenticationException
        IOException
        org.json.JSONException
        org.apache.commons.codec.EncoderException
        NoSuchMethodException
      • trackTransactions

        protected void trackTransactions()
                                  throws org.alfresco.httpclient.AuthenticationException,
                                         IOException,
                                         org.json.JSONException,
                                         org.apache.commons.codec.EncoderException
        Throws:
        org.alfresco.httpclient.AuthenticationException
        IOException
        org.json.JSONException
        org.apache.commons.codec.EncoderException
      • checkNode

        public org.alfresco.solr.NodeReport checkNode​(Long dbid)
        Description copied from class: AbstractTracker
        Returns information about the Node associated with the given dbid.
        Overrides:
        checkNode in class AbstractTracker
        Parameters:
        dbid - the node identifier.
        Returns:
        the Node associated with the given dbid.
      • checkNode

        public org.alfresco.solr.NodeReport checkNode​(org.alfresco.solr.client.Node node)
      • getFullNodesForDbTransaction

        public List<org.alfresco.solr.client.Node> getFullNodesForDbTransaction​(Long txid)
      • checkIndex

        public org.alfresco.solr.tracker.IndexHealthReport checkIndex​(Long toTx,
                                                                      Long toAclTx,
                                                                      Long fromTime,
                                                                      Long toTime)
                                                               throws IOException,
                                                                      org.alfresco.httpclient.AuthenticationException,
                                                                      org.json.JSONException,
                                                                      org.apache.commons.codec.EncoderException,
                                                                      NoSuchMethodException
        Throws:
        IOException
        org.alfresco.httpclient.AuthenticationException
        org.json.JSONException
        org.apache.commons.codec.EncoderException
        NoSuchMethodException
      • addTransactionToPurge

        public void addTransactionToPurge​(Long txId)
      • addNodeToPurge

        public void addNodeToPurge​(Long nodeId)
      • addTransactionToReindex

        public void addTransactionToReindex​(Long txId)
      • addNodeToReindex

        public void addNodeToReindex​(Long nodeId)
      • addTransactionToIndex

        public void addTransactionToIndex​(Long txId)
      • addNodeToIndex

        public void addNodeToIndex​(Long nodeId)
      • addQueryToReindex

        public void addQueryToReindex​(String query)
        Parameters:
        query -