Package org.opencms.search
Class CmsSearchManager.InstantPublishIndexingQueue
java.lang.Object
org.opencms.search.CmsSearchManager.InstantPublishIndexingQueue
- Enclosing class:
CmsSearchManager
Helper class for batching resources arising from multiple independent 'instant publish' operations for indexing.
This is to reduce overhead for indexing, while still limiting the indexing batch size to not block 'interactive' publishing too much.
The batching is time-based, i.e. file changes in a given time span (currently 2 seconds) are collected and then indexed together.
However, changes that include publish resources with state 'deleted' (actual deletions or move operations) are never batched together with others, to avoid complications.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPublishJob(List<CmsPublishedResource> publishJobResources) Adds the resources from a publish job to the queue.protected voidflush()Flushes the currently collected batch of published resources and submits them for indexing.booleanChecks if there is currently any work left to do for the instant publish indexing queue.voidshutdown()Shuts down the queue.protected voidtryIndex(List<CmsPublishedResource> resourceList) Indexes the given list of published resources.
-
Constructor Details
-
InstantPublishIndexingQueue
public InstantPublishIndexingQueue()Creates a new instance.
-
-
Method Details
-
addPublishJob
Adds the resources from a publish job to the queue.- Parameters:
publishJobResources- the publish job resources
-
hasWorkToDo
Checks if there is currently any work left to do for the instant publish indexing queue. -
shutdown
Shuts down the queue. -
flush
Flushes the currently collected batch of published resources and submits them for indexing. -
tryIndex
Indexes the given list of published resources.- Parameters:
resourceList- the resources to index
-