Class ValuesSourceRegistry.Builder
java.lang.Object
org.elasticsearch.search.aggregations.support.ValuesSourceRegistry.Builder
- Enclosing class:
- ValuesSourceRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
<T> void
register(ValuesSourceRegistry.RegistryKey<T> registryKey, List<ValuesSourceType> valuesSourceTypes, T aggregatorSupplier, boolean registerUsage)
Register a ValuesSource to Aggregator mapping.<T> void
register(ValuesSourceRegistry.RegistryKey<T> registryKey, ValuesSourceType valuesSourceType, T aggregatorSupplier, boolean registerUsage)
Register a ValuesSource to Aggregator mapping.void
registerUsage(String aggregationName)
void
registerUsage(String aggregationName, ValuesSourceType valuesSourceType)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
register
public <T> void register(ValuesSourceRegistry.RegistryKey<T> registryKey, ValuesSourceType valuesSourceType, T aggregatorSupplier, boolean registerUsage)Register a ValuesSource to Aggregator mapping. This method registers mappings that only apply to a singleValuesSourceType
- Parameters:
registryKey
- The name of the family of aggregations paired with the expected component supplier type for this family of aggregations. Generally, the aggregation builder is expected to define a constant for use as the registryKeyvaluesSourceType
- The ValuesSourceType this mapping applies to.aggregatorSupplier
- An Aggregation-specific specialization of ComponentSupplier which will construct the mapped aggregatorregisterUsage
- Flag to indicate if this aggregation values source combo should be added to the usage registry. Aggregations that set this to false should register with the usage registry through some other path.
-
register
public <T> void register(ValuesSourceRegistry.RegistryKey<T> registryKey, List<ValuesSourceType> valuesSourceTypes, T aggregatorSupplier, boolean registerUsage)Register a ValuesSource to Aggregator mapping. This version provides a convenience method for mappings that apply to a known list ofValuesSourceType
- Parameters:
registryKey
- The name of the family of aggregations paired with the expected component supplier type for this family of aggregations. Generally, the aggregation builder is expected to define a constant for use as the registryKeyvaluesSourceTypes
- The ValuesSourceTypes this mapping applies to.aggregatorSupplier
- An Aggregation-specific specialization of ComponentSupplier which will construct the mapped aggregatorregisterUsage
- Flag to indicate if this aggregation values source combo should be added to the usage registry. Aggregations that set this to false should register with the usage registry through some other path.
-
registerUsage
-
registerUsage
-
build
-