Interface AggregatorFactory
- All Known Implementing Classes:
Base2ExponentialHistogramAggregation
,DefaultAggregation
,DropAggregation
,ExplicitBucketHistogramAggregation
,LastValueAggregation
,SumAggregation
public interface AggregatorFactory
An internal interface for returning an Aggregator from an Aggregation.
This interface should be removed when adding support for custom aggregations to the metrics SDK.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescription<T extends PointData,
U extends ExemplarData>
Aggregator<T, U> createAggregator
(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode) Returns a newAggregator
.boolean
isCompatibleWithInstrument
(InstrumentDescriptor instrumentDescriptor) Determine if theAggregator
produced bycreateAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)
is compatible with theinstrumentDescriptor
.
-
Method Details
-
createAggregator
<T extends PointData,U extends ExemplarData> Aggregator<T,U> createAggregator(InstrumentDescriptor instrumentDescriptor, ExemplarFilter exemplarFilter, MemoryMode memoryMode) Returns a newAggregator
.- Parameters:
instrumentDescriptor
- the descriptor of theInstrument
that will record measurements.exemplarFilter
- the filter on which measurements should turn into exemplarsmemoryMode
- TheMemoryMode
the aggregator will use- Returns:
- a new
Aggregator
.Aggregator.drop()
indicates no measurements should be recorded.
-
isCompatibleWithInstrument
Determine if theAggregator
produced bycreateAggregator(InstrumentDescriptor, ExemplarFilter, MemoryMode)
is compatible with theinstrumentDescriptor
.
-