MemoryAccountingBitsetCollectorManager (Lucene 10.5.0 misc API)
Description: declaration: package: org.apache.lucene.misc.search, class: MemoryAccountingBitsetCollectorManager

Package org.apache.lucene.misc.search

# Class MemoryAccountingBitsetCollectorManager

java.lang.Object
org.apache.lucene.misc.search.MemoryAccountingBitsetCollectorManager

All Implemented Interfaces:
  `CollectorManager<MemoryAccountingBitsetCollector,MemoryAccountingBitsetCollectorManager.Result>`

public class MemoryAccountingBitsetCollectorManager extends Object implements CollectorManager<MemoryAccountingBitsetCollector,MemoryAccountingBitsetCollectorManager.Result>
CollectorManager for MemoryAccountingBitsetCollector that supports concurrent search.

Creates multiple collectors for concurrent execution, each collector only allocates bitset for slices it processes, then merges with proper offset in reduce().

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `MemoryAccountingBitsetCollectorManager.Result`
  The result of a search, containing the matched document IDs and total memory used.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MemoryAccountingBitsetCollectorManager(CollectorMemoryTracker tracker)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MemoryAccountingBitsetCollector`
  `newCollector()`
  `MemoryAccountingBitsetCollectorManager.Result`
  `reduce(Collection<MemoryAccountingBitsetCollector> collectors)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MemoryAccountingBitsetCollectorManager

    public MemoryAccountingBitsetCollectorManager(CollectorMemoryTracker tracker)

- ## Method Details

  - ### newCollector

    public MemoryAccountingBitsetCollector newCollector()
    Specified by:
      `newCollector` in interface `CollectorManager<MemoryAccountingBitsetCollector,MemoryAccountingBitsetCollectorManager.Result>`

  - ### reduce

    public MemoryAccountingBitsetCollectorManager.Result reduce(Collection<MemoryAccountingBitsetCollector> collectors)
    Specified by:
      `reduce` in interface `CollectorManager<MemoryAccountingBitsetCollector,MemoryAccountingBitsetCollectorManager.Result>`