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 Collector
Creates the collector to be wrapped with aProfilerCollector
final ProfilerCollector
Return 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:CollectorManager
Return a newCollector
. This must return a different instance on each call.- Specified by:
newCollector
in interfaceCollectorManager<ProfilerCollector,
ProfilerCollectorResult> - Throws:
IOException
-
reduce
Description copied from interface:CollectorManager
Reduce the results of individual collectors into a meaningful result. For instance aTopDocsCollector
would compute thetop docs
of 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:
reduce
in interfaceCollectorManager<ProfilerCollector,
ProfilerCollectorResult> - Throws:
IOException
-