Modifier and Type | Method and Description |
---|---|
long |
count()
Not supported, will always return 0.
|
static BucketTimer |
get(Registry registry,
Id id,
java.util.function.LongFunction<java.lang.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.
|
java.lang.Iterable<Measurement> |
measure()
Get the set of measurements for this meter.
|
<T> T |
record(java.util.concurrent.Callable<T> rf)
Executes the callable `f` and records the time taken.
|
void |
record(long amount,
java.util.concurrent.TimeUnit unit)
Updates the statistics kept by the counter with the specified amount.
|
void |
record(java.lang.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, java.util.function.LongFunction<java.lang.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()
Meter
public java.lang.Iterable<Measurement> measure()
Meter
public boolean hasExpired()
Meter
hasExpired
in interface Meter
public void record(long amount, java.util.concurrent.TimeUnit unit)
Timer
public <T> T record(java.util.concurrent.Callable<T> rf) throws java.lang.Exception
Timer
public void record(java.lang.Runnable rf)
Timer
public long count()