Module org.apache.lucene.sandbox
Package org.apache.lucene.sandbox.search
Class ProfilerCollectorManager
java.lang.Object
org.apache.lucene.sandbox.search.ProfilerCollectorManager
- All Implemented Interfaces:
CollectorManager<ProfilerCollector,ProfilerCollectorResult>
public abstract class ProfilerCollectorManager
extends Object
implements CollectorManager<ProfilerCollector,ProfilerCollectorResult>
Collector manager for
ProfilerCollector-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProfilerCollectorManager(String reason) Creates a profiler collector manager provided a certain reason -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CollectorCreates the collector to be wrapped with aProfilerCollectorfinal ProfilerCollectorReturn a newCollector.reduce(Collection<ProfilerCollector> collectors) Reduce the results of individual collectors into a meaningful result.
-
Field Details
-
reason
-
-
Constructor Details
-
ProfilerCollectorManager
Creates a profiler collector manager provided a certain reason- Parameters:
reason- the reason for the collection
-
-
Method Details
-
createCollector
Creates the collector to be wrapped with aProfilerCollector- Throws:
IOException
-
newCollector
Description copied from interface:CollectorManagerReturn a newCollector. This must return a different instance on each call.- Specified by:
newCollectorin interfaceCollectorManager<ProfilerCollector,ProfilerCollectorResult> - Throws:
IOException
-
reduce
Description copied from interface:CollectorManagerReduce the results of individual collectors into a meaningful result. For instance aTopDocsCollectorwould compute thetop docsof each collector and then merge them usingTopDocs.merge(int, TopDocs[]). This method must be called after collection is finished on all provided collectors.- Specified by:
reducein interfaceCollectorManager<ProfilerCollector,ProfilerCollectorResult> - Throws:
IOException
-