public final class BucketCounter extends Object implements DistributionSummary
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Not supported, will always return 0.
|
static BucketCounter |
get(Registry registry,
Id id,
LongFunction<String> f)
Creates a distribution summary object that manages a set of counters based on the bucket
function supplied.
|
boolean |
hasExpired()
Indicates whether the meter is expired.
|
Id |
id()
Identifier used to lookup this meter in the registry.
|
Iterable<Measurement> |
measure()
Get the set of measurements for this meter.
|
void |
record(long amount)
Updates the statistics kept by the summary with the specified amount.
|
long |
totalAmount()
Not supported, will always return 0.
|
public static BucketCounter get(Registry registry, Id id, LongFunction<String> f)
registry - Registry to use.id - Identifier for the metric being registered.f - Function to map values to buckets. See BucketFunctions for more information.public Id id()
Meterpublic Iterable<Measurement> measure()
Meterpublic boolean hasExpired()
MeterhasExpired in interface Meterpublic void record(long amount)
DistributionSummaryrecord in interface DistributionSummaryamount - 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.public long count()
count in interface DistributionSummarypublic long totalAmount()
totalAmount in interface DistributionSummary