Interface FunctionCounter
- All Superinterfaces:
Meter
- All Known Implementing Classes:
DropwizardTypes.DescribableFunctionCounter
A counter that tracks a monotonically increasing function.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Fluent builder for function counters.Nested classes/interfaces inherited from interface org.forgerock.monitoring.api.instrument.Meter
Meter.Id, Meter.Type
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FunctionCounter.Builder<T>
builder
(String name, T obj, ToDoubleFunction<T> f) Return the Builder object for this FunctionCounter.double
count()
Returns the cumulative count since this function counter was created.default Iterable<Measurement>
measure()
Get a set of measurements.
-
Method Details
-
builder
Return the Builder object for this FunctionCounter.- Type Parameters:
T
- The type of the object to monitor- Parameters:
name
- of the FunctionCounterobj
- The object to monitorf
- The function to apply to the object to monitor- Returns:
- the Builder for a FunctionCounter
-
count
double count()Returns the cumulative count since this function counter was created.- Returns:
- the cumulative count since this function counter was created
-
measure
Description copied from interface:Meter
Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
-