| Modifier and Type | Method and Description |
|---|---|
long |
count()
Not supported, will always return 0.
|
static BucketTimer |
get(Registry registry,
Id id,
LongFunction<String> f)
Creates a timer object that manages a set of timers 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.
|
<T> T |
record(Callable<T> rf)
Executes the callable `f` and records the time taken.
|
void |
record(long amount,
TimeUnit unit)
Updates the statistics kept by the counter with the specified amount.
|
void |
record(Runnable rf)
Executes the runnable `f` and records the time taken.
|
long |
totalTime()
Not supported, will always return 0.
|
public static BucketTimer 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,
TimeUnit unit)
Timerpublic <T> T record(Callable<T> rf) throws Exception
Timerpublic void record(Runnable rf)
Timerpublic long count()