Class NoopIndexingQueueManager

java.lang.Object
io.jmix.search.index.impl.NoopIndexingQueueManager
All Implemented Interfaces:
IndexingQueueManager

public class NoopIndexingQueueManager extends Object implements IndexingQueueManager
  • Constructor Details

    • NoopIndexingQueueManager

      public NoopIndexingQueueManager()
  • Method Details

    • emptyQueue

      public int emptyQueue()
      Description copied from interface: IndexingQueueManager
      Removes all queue items.
      Specified by:
      emptyQueue in interface IndexingQueueManager
      Returns:
      amount of deleted items
    • emptyQueue

      public int emptyQueue(String entityName)
      Description copied from interface: IndexingQueueManager
      Removes all queue items related to provided entity.
      Specified by:
      emptyQueue in interface IndexingQueueManager
      Parameters:
      entityName - entity
      Returns:
      amount of deleted items
    • enqueueIndex

      public int enqueueIndex(Object entityInstance)
      Description copied from interface: IndexingQueueManager
      Sends provided entity instance to indexing queue in order to store it to index.
      Specified by:
      enqueueIndex in interface IndexingQueueManager
      Parameters:
      entityInstance - instance
      Returns:
      amount of enqueued instances
    • enqueueIndexCollection

      public int enqueueIndexCollection(Collection<Object> entityInstances)
      Description copied from interface: IndexingQueueManager
      Sends provided entity instances to indexing queue in order to store them to index.
      Specified by:
      enqueueIndexCollection in interface IndexingQueueManager
      Parameters:
      entityInstances - instances
      Returns:
      amount of enqueued instances
    • enqueueIndexByEntityId

      public int enqueueIndexByEntityId(Id<?> entityId)
      Description copied from interface: IndexingQueueManager
      Sends entity instance to indexing queue by provided ID in order to store it to index.
      Specified by:
      enqueueIndexByEntityId in interface IndexingQueueManager
      Parameters:
      entityId - ID of entity instance
      Returns:
      amount of enqueued instances
    • enqueueIndexCollectionByEntityIds

      public int enqueueIndexCollectionByEntityIds(Collection<Id<?>> entityIds)
      Description copied from interface: IndexingQueueManager
      Sends entity instances to indexing queue by provided IDs in order to store them to index.
      Specified by:
      enqueueIndexCollectionByEntityIds in interface IndexingQueueManager
      Parameters:
      entityIds - IDs of entity instances
      Returns:
      amount of enqueued instances
    • enqueueIndexAll

      public int enqueueIndexAll()
      Description copied from interface: IndexingQueueManager
      Synchronously sends all instances of all index-configured entities to indexing queue.

      Don't use it on a huge amount of data - all ids (per entity) will be kept in memory during this process. Use IndexingQueueManager.initAsyncEnqueueIndexAll() methods instead.

      Specified by:
      enqueueIndexAll in interface IndexingQueueManager
      Returns:
      amount of enqueued instances
    • enqueueIndexAll

      public int enqueueIndexAll(String entityName)
      Description copied from interface: IndexingQueueManager
      Synchronously sends all instances of provided entity to indexing queue.

      Don't use it on a huge amount of data - all ids will be kept in memory during this process. Use IndexingQueueManager.initAsyncEnqueueIndexAll() methods instead.

      Specified by:
      enqueueIndexAll in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      amount of enqueued instances
    • getEntityNamesOfEnqueueingSessions

      public List<String> getEntityNamesOfEnqueueingSessions()
      Description copied from interface: IndexingQueueManager
      Gets entity names of all existing enqueueing sessions.
      Specified by:
      getEntityNamesOfEnqueueingSessions in interface IndexingQueueManager
      Returns:
      list of entity names
    • initAsyncEnqueueIndexAll

      public void initAsyncEnqueueIndexAll()
      Description copied from interface: IndexingQueueManager
      Initializes async enqueueing session for all indexed entities.
      Specified by:
      initAsyncEnqueueIndexAll in interface IndexingQueueManager
    • initAsyncEnqueueIndexAll

      public boolean initAsyncEnqueueIndexAll(String entityName)
      Description copied from interface: IndexingQueueManager
      Initializes async enqueueing session for provided entity. Existing session will be removed and created again.
      Specified by:
      initAsyncEnqueueIndexAll in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      true if operation was successfully performed, false otherwise
    • suspendAsyncEnqueueIndexAll

      public void suspendAsyncEnqueueIndexAll()
      Description copied from interface: IndexingQueueManager
      Suspends all enqueueing sessions. Suspended sessions are ignored during session processing. Session can be resumed by IndexingQueueManager.resumeAsyncEnqueueIndexAll()
      Specified by:
      suspendAsyncEnqueueIndexAll in interface IndexingQueueManager
    • suspendAsyncEnqueueIndexAll

      public boolean suspendAsyncEnqueueIndexAll(String entityName)
      Description copied from interface: IndexingQueueManager
      Suspends enqueueing session for provided entity. Suspended sessions are ignored during session processing. Session can be resumed by IndexingQueueManager.resumeAsyncEnqueueIndexAll()
      Specified by:
      suspendAsyncEnqueueIndexAll in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      true if operation was successfully performed, false otherwise
    • resumeAsyncEnqueueIndexAll

      public void resumeAsyncEnqueueIndexAll()
      Description copied from interface: IndexingQueueManager
      Resumes all previously suspended enqueueing sessions.
      Specified by:
      resumeAsyncEnqueueIndexAll in interface IndexingQueueManager
    • resumeAsyncEnqueueIndexAll

      public boolean resumeAsyncEnqueueIndexAll(String entityName)
      Description copied from interface: IndexingQueueManager
      Resumes previously suspended enqueueing session for provided entity.
      Specified by:
      resumeAsyncEnqueueIndexAll in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      true if operation was successfully performed, false otherwise
    • terminateAsyncEnqueueIndexAll

      public void terminateAsyncEnqueueIndexAll()
      Description copied from interface: IndexingQueueManager
      Terminates all enqueueing sessions.
      Specified by:
      terminateAsyncEnqueueIndexAll in interface IndexingQueueManager
    • terminateAsyncEnqueueIndexAll

      public boolean terminateAsyncEnqueueIndexAll(String entityName)
      Description copied from interface: IndexingQueueManager
      Terminates enqueueing session for provided entity.
      Specified by:
      terminateAsyncEnqueueIndexAll in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      true if operation was successfully performed, false otherwise
    • processNextEnqueueingSession

      public int processNextEnqueueingSession()
      Description copied from interface: IndexingQueueManager
      Processes next available enqueueing session - one batch (with default size) of entity instances will be enqueued.
      Specified by:
      processNextEnqueueingSession in interface IndexingQueueManager
      Returns:
      amount of processed entity instances
    • processNextEnqueueingSession

      public int processNextEnqueueingSession(int batchSize)
      Description copied from interface: IndexingQueueManager
      Processes next available enqueueing session - one batch (with provided size) of entity instances will be enqueued.
      Specified by:
      processNextEnqueueingSession in interface IndexingQueueManager
      Parameters:
      batchSize - batch size
      Returns:
      amount of processed entity instances
    • processEnqueueingSession

      public int processEnqueueingSession(String entityName)
      Description copied from interface: IndexingQueueManager
      Processes enqueueing session for provided entity - one batch (with default size) of entity instances will be enqueued.
      Specified by:
      processEnqueueingSession in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      Returns:
      amount of processed entity instances
    • processEnqueueingSession

      public int processEnqueueingSession(String entityName, int batchSize)
      Description copied from interface: IndexingQueueManager
      Processes enqueueing session for provided entity - one batch (with provided size) of entity instances will be enqueued.
      Specified by:
      processEnqueueingSession in interface IndexingQueueManager
      Parameters:
      entityName - entity name
      batchSize - batch size
      Returns:
      amount of processed entity instances
    • enqueueDelete

      public int enqueueDelete(Object entityInstance)
      Description copied from interface: IndexingQueueManager
      Sends provided entity instance to indexing queue in order to delete it from index.
      Specified by:
      enqueueDelete in interface IndexingQueueManager
      Parameters:
      entityInstance - instance
      Returns:
      amount of enqueued instances
    • enqueueDeleteCollection

      public int enqueueDeleteCollection(Collection<Object> entityInstances)
      Description copied from interface: IndexingQueueManager
      Sends provided entity instances to indexing queue in order to delete them from index.
      Specified by:
      enqueueDeleteCollection in interface IndexingQueueManager
      Parameters:
      entityInstances - instances
      Returns:
      amount of enqueued instances
    • enqueueDeleteByEntityId

      public int enqueueDeleteByEntityId(Id<?> entityId)
      Description copied from interface: IndexingQueueManager
      Sends entity instance to indexing queue by provided ID in order to delete it from index.
      Specified by:
      enqueueDeleteByEntityId in interface IndexingQueueManager
      Parameters:
      entityId - ID of entity instance
      Returns:
      amount of enqueued instances
    • enqueueDeleteCollectionByEntityIds

      public int enqueueDeleteCollectionByEntityIds(Collection<Id<?>> entityIds)
      Description copied from interface: IndexingQueueManager
      Sends entity instances to indexing queue by provided IDs in order to delete them from index.
      Specified by:
      enqueueDeleteCollectionByEntityIds in interface IndexingQueueManager
      Parameters:
      entityIds - IDs of entity instances
      Returns:
      amount of enqueued instances
    • processNextBatch

      public int processNextBatch()
      Description copied from interface: IndexingQueueManager
      Retrieves next batch of items from indexing queue and processes them - store/remove related documents in index.
      Specified by:
      processNextBatch in interface IndexingQueueManager
      Returns:
      amount of processed queue items
    • processNextBatch

      public int processNextBatch(int batchSize)
      Description copied from interface: IndexingQueueManager
      Retrieves next batch of items from indexing queue and processes them - store/remove related documents in index.
      Specified by:
      processNextBatch in interface IndexingQueueManager
      Parameters:
      batchSize - amount of queue items to process
      Returns:
      amount of processed queue items
    • processEntireQueue

      public int processEntireQueue()
      Description copied from interface: IndexingQueueManager
      Retrieves items from indexing queue and processes them - store/remove related documents in index.
      Specified by:
      processEntireQueue in interface IndexingQueueManager
      Returns:
      amount of processed queue items
    • processEntireQueue

      public int processEntireQueue(int batchSize)
      Description copied from interface: IndexingQueueManager
      Retrieves items from indexing queue and processes them - store/remove related documents in index.
      Specified by:
      processEntireQueue in interface IndexingQueueManager
      Parameters:
      batchSize - amount of queue items to process within single batch
      Returns:
      amount of processed queue items