public class JCRIndexingServiceImpl extends Object implements JCRIndexingService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
LAST_OPERATION_FILE_NAME |
| Constructor and Description |
|---|
JCRIndexingServiceImpl(org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService,
org.exoplatform.services.jcr.RepositoryService repositoryService,
JCRIndexingQueueDAO indexingQueueDAO,
org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyIndexChangesOnJCR(List<JCRIndexQueueEntity> indexingQueueEntities)
Apply the changes coming from queue to JCR.
|
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
|
void |
applyIndexChangesOnQueue(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 Queue
|
List<JCRIndexQueueEntity> |
findNextOperations(int offset,
int batchNumber) |
String |
getLastExecutedOperation() |
int |
getQueueProcessingPeriod() |
void |
index(String jcrUUID,
String workspaceId,
boolean parentChange) |
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.
|
void |
persistLastOperationId() |
void |
persistQueueOperations() |
void |
processIndexingQueue()
1/ Read from Queue
2/ Index in JCR 3/ Update Queue to mark operation as executed for this node |
void |
reindex(String jcrUUID,
String workspaceId,
boolean parentChange) |
void |
start() |
void |
stop() |
void |
unindex(String jcrUUID,
String workspaceId,
boolean parentChange) |
void |
unindexAll(String workspaceId) |
void |
updateQueueSwitchStatusInFile() |
public static final String LAST_OPERATION_FILE_NAME
public JCRIndexingServiceImpl(org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService,
org.exoplatform.services.jcr.RepositoryService repositoryService,
JCRIndexingQueueDAO indexingQueueDAO,
org.exoplatform.container.xml.InitParams params)
public void processIndexingQueue()
throws Exception
processIndexingQueue in interface JCRIndexingServiceExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void applyIndexChangesOnQueue(org.exoplatform.services.jcr.impl.core.query.ChangesFilterListsWrapper changes,
String workspaceId)
applyIndexChangesOnQueue in interface JCRIndexingServiceworkspaceId - REPOSITORY_WORKSPACEpublic void applyIndexChangesOnQueue(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes, Set<String> parentAddedNodes, String workspaceId)
JCRIndexingServiceapplyIndexChangesOnQueue in interface JCRIndexingServiceremovedNodes - removed nodes JCR UUIDaddedNodes - added nodes JCR UUIDparentRemovedNodes - removed Parent JCR nodes UUIDparentAddedNodes - added Parent JCR nodes UUIDworkspaceId - REPOSITORY_WORKSPACEpublic void init(org.exoplatform.services.jcr.impl.core.query.QueryHandler handler,
org.exoplatform.services.jcr.config.QueryHandlerEntry config)
init in interface JCRIndexingServicepublic void applyIndexChangesOnJCR(List<JCRIndexQueueEntity> indexingQueueEntities) throws Exception
indexingQueueEntities - List of JCRIndexQueueEntity to
indexException - when an error happens while indexing the operationpublic List<JCRIndexQueueEntity> findNextOperations(int offset, int batchNumber)
public void unindexAll(String workspaceId)
public void updateQueueSwitchStatusInFile()
public String getLastExecutedOperation()
public int getQueueProcessingPeriod()
public void persistQueueOperations()
public void persistLastOperationId()
Copyright © 2003–2020 eXo Platform SAS. All rights reserved.