Interface LuceneAggregatorRegistry
- All Superinterfaces:
LuceneAggregatorFactory
- All Known Implementing Classes:
DefaultLuceneAggregatorRegistry
Registry for
LuceneAggregatorRegistry.LuceneAggregatorProviders.
Aggregators are stateful. This registry doesn't store the aggregators themselves, but rather the providers that can create them.
- Since:
- 10.5
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceLuceneAggregatorRegistry.LuceneAggregatorProvider<A extends Aggregation,R extends AggregationResult> Interface for providingLuceneAggregators forAggregations. -
Method Summary
Modifier and TypeMethodDescriptiongetProvider(Aggregation aggregation) Get theLuceneAggregatorRegistry.LuceneAggregatorProviderfor the givenAggregation.<A extends Aggregation,R extends AggregationResult>
voidregister(Class<A> clazz, LuceneAggregatorRegistry.LuceneAggregatorProvider<A, R> provider) Register aLuceneAggregatorRegistry.LuceneAggregatorProviderfor the givenAggregationclass.Methods inherited from interface com.atlassian.jira.search.lucene.aggregation.LuceneAggregatorFactory
buildAggregator, mapAggregationsRequest, mapAggregationsRequest
-
Method Details
-
getProvider
LuceneAggregatorRegistry.LuceneAggregatorProvider<Aggregation,AggregationResult> getProvider(Aggregation aggregation) Get theLuceneAggregatorRegistry.LuceneAggregatorProviderfor the givenAggregation.- Parameters:
aggregation- the aggregation definition- Returns:
- the provider for the given aggregation
- Throws:
IllegalArgumentException- if no provider is registered for the given aggregation
-
register
<A extends Aggregation,R extends AggregationResult> void register(Class<A> clazz, LuceneAggregatorRegistry.LuceneAggregatorProvider<A, R> provider) Register aLuceneAggregatorRegistry.LuceneAggregatorProviderfor the givenAggregationclass.If the given class is already registered, the new provider will replace the existing one.
- Type Parameters:
A- the type ofAggregationthat the provider can create aggregators forR- the type ofAggregationResultthat the aggregator created by this provider will produce- Parameters:
clazz- the aggregation classprovider- the provider for the given aggregation
-