Class JCRIndexingServiceImpl

    • Constructor Detail

      • JCRIndexingServiceImpl

        public JCRIndexingServiceImpl​(org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService,
                                      org.exoplatform.services.jcr.RepositoryService repositoryService,
                                      JCRIndexingQueueDAO indexingQueueDAO,
                                      org.exoplatform.container.xml.InitParams params)
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface org.picocontainer.Startable
      • stop

        public void stop()
        Specified by:
        stop in interface org.picocontainer.Startable
      • applyIndexChangesOnQueue

        public void applyIndexChangesOnQueue​(org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper changes,
                                             String workspaceId)
        JCR Index Changes applied on JCR to propagate for other nodes through Queue
        Specified by:
        applyIndexChangesOnQueue in interface JCRIndexingService
        workspaceId - REPOSITORY_WORKSPACE
      • applyIndexChangesOnQueue

        public void applyIndexChangesOnQueue​(Set<String> removedNodes,
                                             Set<String> addedNodes,
                                             Set<String> parentRemovedNodes,
                                             Set<String> parentAddedNodes,
                                             String workspaceId)
        Description copied from interface: JCRIndexingService
        JCR Index Changes applied on JCR to propagate for other nodes through Queue
        Specified by:
        applyIndexChangesOnQueue in interface JCRIndexingService
        Parameters:
        removedNodes - removed nodes JCR UUID
        addedNodes - added nodes JCR UUID
        parentRemovedNodes - removed Parent JCR nodes UUID
        parentAddedNodes - added Parent JCR nodes UUID
        workspaceId - REPOSITORY_WORKSPACE
      • init

        public void init​(org.exoplatform.services.jcr.impl.core.query.QueryHandler handler,
                         org.exoplatform.services.jcr.config.QueryHandlerEntry config)
        Update Queue, JCR indexes and status file. Initialize JCR Indexing Service
        Specified by:
        init in interface JCRIndexingService
      • applyIndexChangesOnJCR

        public void applyIndexChangesOnJCR​(List<JCRIndexQueueEntity> indexingQueueEntities)
                                    throws Exception
        Apply the changes coming from queue to JCR. The changes are identitifed by JCR UUID and Operation type.
        Parameters:
        indexingQueueEntities - List of JCRIndexQueueEntity to index
        Throws:
        Exception - when an error happens while indexing the operation
      • index

        public void index​(String jcrUUID,
                          String workspaceId,
                          boolean parentChange)
      • reindex

        public void reindex​(String jcrUUID,
                            String workspaceId,
                            boolean parentChange)
      • unindex

        public void unindex​(String jcrUUID,
                            String workspaceId,
                            boolean parentChange)
      • unindexAll

        public void unindexAll​(String workspaceId)
      • updateQueueSwitchStatusInFile

        public void updateQueueSwitchStatusInFile()
      • getLastExecutedOperation

        public String getLastExecutedOperation()
      • getQueueProcessingPeriod

        public int getQueueProcessingPeriod()
      • persistQueueOperations

        public void persistQueueOperations()
      • persistLastOperationId

        public void persistLastOperationId()