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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJCRIndexingServiceImpl(org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService, org.exoplatform.services.jcr.RepositoryService repositoryService, JCRIndexingQueueDAO indexingQueueDAO, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyIndexChangesOnJCR(List<JCRIndexQueueEntity> indexingQueueEntities) Apply the changes coming from queue to JCR.voidapplyIndexChangesOnQueue(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes, Set<String> parentAddedNodes, String workspaceId) JCR Index Changes applied on JCR to propagate for other nodes through QueuevoidapplyIndexChangesOnQueue(org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper changes, String workspaceId) JCR Index Changes applied on JCR to propagate for other nodes through QueuefindNextOperations(int offset, int batchNumber) intvoidvoidinit(org.exoplatform.services.jcr.impl.core.query.QueryHandler handler, org.exoplatform.services.jcr.config.QueryHandlerEntry config) Update Queue, JCR indexes and status file.voidvoidvoid1/ Read from Queue
2/ Index in JCR
3/ Update Queue to mark operation as executed for this nodevoidvoidstart()voidstop()voidvoidunindexAll(String workspaceId) void
-
Field Details
-
LAST_OPERATION_FILE_NAME
- See Also:
-
-
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
1/ Read from Queue
2/ Index in JCR
3/ Update Queue to mark operation as executed for this node- Specified by:
processIndexingQueuein interfaceJCRIndexingService- Throws:
Exception
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.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:
applyIndexChangesOnQueuein interfaceJCRIndexingServiceworkspaceId- REPOSITORY_WORKSPACE
-
applyIndexChangesOnQueue
public void applyIndexChangesOnQueue(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes, Set<String> parentAddedNodes, String workspaceId) Description copied from interface:JCRIndexingServiceJCR Index Changes applied on JCR to propagate for other nodes through Queue- Specified by:
applyIndexChangesOnQueuein interfaceJCRIndexingService- Parameters:
removedNodes- removed nodes JCR UUIDaddedNodes- added nodes JCR UUIDparentRemovedNodes- removed Parent JCR nodes UUIDparentAddedNodes- added Parent JCR nodes UUIDworkspaceId- 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:
initin interfaceJCRIndexingService
-
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-ListofJCRIndexQueueEntityto index- Throws:
Exception- when an error happens while indexing the operation
-
findNextOperations
-
index
-
reindex
-
unindex
-
unindexAll
-
updateQueueSwitchStatusInFile
public void updateQueueSwitchStatusInFile() -
getLastExecutedOperation
-
getQueueProcessingPeriod
public int getQueueProcessingPeriod() -
persistQueueOperations
public void persistQueueOperations() -
persistLastOperationId
public void persistLastOperationId()
-