Package io.micrometer.core.instrument
Class AbstractDistributionSummary
java.lang.Object
io.micrometer.core.instrument.AbstractMeter
io.micrometer.core.instrument.AbstractDistributionSummary
- All Implemented Interfaces:
HistogramSupport,DistributionSummary,Meter
- Direct Known Subclasses:
CumulativeDistributionSummary,DropwizardDistributionSummary,StepDistributionSummary
public abstract class AbstractDistributionSummary extends AbstractMeter implements DistributionSummary
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.core.instrument.DistributionSummary
DistributionSummary.BuilderNested classes/interfaces inherited from interface io.micrometer.core.instrument.Meter
Meter.Builder, Meter.Id, Meter.Type -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDistributionSummary(Meter.Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig, double scale, boolean supportsAggregablePercentiles) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()voidrecord(double amount)Updates the statistics kept by the summary with the specified amount.protected abstract voidrecordNonNegative(double amount)HistogramSnapshottakeSnapshot()Summary statistics should be published off of a single snapshot instance so that, for example, there isn't disagreement between the distribution's bucket counts because more events continue to stream in.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micrometer.core.instrument.DistributionSummary
count, histogramCountAtValue, max, mean, measure, percentile, totalAmountMethods inherited from interface io.micrometer.core.instrument.distribution.HistogramSupport
takeSnapshot
-
Field Details
-
Constructor Details
-
AbstractDistributionSummary
protected AbstractDistributionSummary(Meter.Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig, double scale, boolean supportsAggregablePercentiles)
-
-
Method Details
-
record
public final void record(double amount)Description copied from interface:DistributionSummaryUpdates the statistics kept by the summary with the specified amount.- Specified by:
recordin interfaceDistributionSummary- Parameters:
amount- Amount for an event being measured. For example, if the size in bytes of responses from a server. If the amount is less than 0 the value will be dropped.
-
recordNonNegative
protected abstract void recordNonNegative(double amount) -
takeSnapshot
Description copied from interface:HistogramSupportSummary statistics should be published off of a single snapshot instance so that, for example, there isn't disagreement between the distribution's bucket counts because more events continue to stream in.- Specified by:
takeSnapshotin interfaceHistogramSupport- Returns:
- A snapshot of all distribution statistics at a point in time.
-
equals
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-