Package io.jmix.search.index.queue.impl
Class JpaIndexingQueueManager.QueueItemsAggregator
java.lang.Object
io.jmix.search.index.queue.impl.JpaIndexingQueueManager.QueueItemsAggregator
- Enclosing class:
- JpaIndexingQueueManager
Analyzes collection of 
IndexingQueueItem, determines unique entity ids
 and splits them among two disjoint groups: for index and for delete.
 Group for specific id is determined by 'effective queue item' - the latest one for that id.
In case of multiple queue items related to single entity id it allows to perform only one actual operation on each id and remove all related queue items.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedQueueItemsAggregator(Collection<IndexingQueueItem> queueItems) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected Map<Id<?>,List<IndexingQueueItem>> Gets all entity ids that should be deleted from index.protected Map<Id<?>,List<IndexingQueueItem>> Gets all entity ids that should be indexed.protected Map<Id<?>,List<IndexingQueueItem>> getOperationItemsGroup(IndexingOperation operation) protected voidgroupQueueItems(Collection<IndexingQueueItem> queueItems) 
- 
Constructor Details- 
QueueItemsAggregator
 
- 
- 
Method Details- 
getIndexItemsGroupGets all entity ids that should be indexed.Every entity id is mapped to all IndexingQueueItemrelated to this id.- Returns:
- Map with entity ids as keys and lists of related queue items as values
 
- 
getDeleteItemsGroupGets all entity ids that should be deleted from index.Every entity id is mapped to all IndexingQueueItemrelated to this id.- Returns:
- Map with entity ids as keys and lists of related queue items as values
 
- 
getOperationItemsGroup
- 
groupQueueItems
 
-