Class JCRIndexingServiceImpl

java.lang.Object
org.exoplatform.services.jcr.ext.index.persistent.impl.JCRIndexingServiceImpl
All Implemented Interfaces:
JCRIndexingService, org.picocontainer.Startable

public class JCRIndexingServiceImpl extends Object implements JCRIndexingService, org.picocontainer.Startable
  • Field Details

  • Constructor Details

    • 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 Details

    • processIndexingQueue

      public void processIndexingQueue() throws Exception
      1/ Read from Queue
      2/ Index in JCR
      3/ Update Queue to mark operation as executed for this node
      Specified by:
      processIndexingQueue in interface JCRIndexingService
      Throws:
      Exception
    • 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
      Parameters:
      changes -
      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
      Parameters:
      handler -
      config -
    • 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
    • findNextOperations

      public List<JCRIndexQueueEntity> findNextOperations(int offset, int batchNumber)
    • 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()