Timer.BatchUpdater
Modifier and Type | Method and Description |
---|---|
Clock |
clock()
The clock used for timing events.
|
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.
|
void |
record(long amount,
TimeUnit unit)
Updates the statistics kept by the timer with the specified amount.
|
long |
totalTime()
Not supported, will always return 0.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
batchUpdater, record, record, record, record, record, recordBooleanSupplier, recordCallable, recordDoubleSupplier, recordIntSupplier, recordLongSupplier, recordRunnable, recordSupplier, wrapBiConsumer, wrapBiFunction, wrapBinaryOperator, wrapBiPredicate, wrapBooleanSupplier, wrapCallable, wrapConsumer, wrapDoubleBinaryOperator, wrapDoubleConsumer, wrapDoubleFunction, wrapDoublePredicate, wrapDoubleSupplier, wrapDoubleToIntFunction, wrapDoubleToLongFunction, wrapDoubleUnaryOperator, wrapFunction, wrapIntBinaryOperator, wrapIntConsumer, wrapIntFunction, wrapIntPredicate, wrapIntSupplier, wrapIntToDoubleFunction, wrapIntToLongFunction, wrapIntUnaryOperator, wrapLongBinaryOperator, wrapLongConsumer, wrapLongFunction, wrapLongPredicate, wrapLongSupplier, wrapLongToDoubleFunction, wrapLongToIntFunction, wrapLongUnaryOperator, wrapObjDoubleConsumer, wrapObjIntConsumer, wrapObjLongConsumer, wrapPredicate, wrapRunnable, wrapSupplier, wrapToDoubleBiFunction, wrapToDoubleFunction, wrapToIntBiFunction, wrapToIntFunction, wrapToLongBiFunction, wrapToLongFunction, wrapUnaryOperator
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()
Meter
public Iterable<Measurement> measure()
Meter
public boolean hasExpired()
Meter
hasExpired
in interface Meter
public Clock clock()
Timer
public void record(long amount, TimeUnit unit)
Timer
public long count()