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 Details

  • Method Details

    • addPublishJob

      public void addPublishJob(List<CmsPublishedResource> publishJobResources)
      Adds the resources from a publish job to the queue.
      Parameters:
      publishJobResources - the publish job resources
    • hasWorkToDo

      public boolean hasWorkToDo()
      Checks if there is currently any work left to do for the instant publish indexing queue.
    • shutdown

      public void shutdown()
      Shuts down the queue.
    • flush

      protected void flush()
      Flushes the currently collected batch of published resources and submits them for indexing.
    • tryIndex

      protected void tryIndex(List<CmsPublishedResource> resourceList)
      Indexes the given list of published resources.
      Parameters:
      resourceList - the resources to index