public abstract class AggregatorFactory extends Object
Aggregator
of a specific type.Modifier and Type | Field and Description |
---|---|
protected AggregatorFactories |
factories |
protected String |
name |
protected AggregatorFactory |
parent |
protected String |
type |
Constructor and Description |
---|
AggregatorFactory(String name,
String type)
Constructs a new aggregator factory.
|
Modifier and Type | Method and Description |
---|---|
abstract Aggregator |
create(AggregationContext context,
Aggregator parent,
long expectedBucketsCount)
Creates the aggregator
|
void |
doValidate() |
AggregatorFactory |
parent() |
AggregatorFactory |
subFactories(AggregatorFactories subFactories)
Registers sub-factories with this factory.
|
void |
validate()
Validates the state of this factory (makes sure the factory is properly configured)
|
protected String name
protected String type
protected AggregatorFactory parent
protected AggregatorFactories factories
public AggregatorFactory subFactories(AggregatorFactories subFactories)
subFactories
- The sub-factoriespublic final void validate()
public AggregatorFactory parent()
null
for top level aggregator factories).public abstract Aggregator create(AggregationContext context, Aggregator parent, long expectedBucketsCount)
context
- The aggregation contextparent
- The parent aggregator (if this is a top level factory, the parent will be null
)expectedBucketsCount
- If this is a sub-factory of another factory, this will indicate the number of bucket the parent aggregator
may generate (this is an estimation only). For top level factories, this will always be 0public void doValidate()
Copyright © 2009–2015. All rights reserved.