Interface Counter
-
- All Superinterfaces:
Meter
- All Known Implementing Classes:
DropwizardTypes.DescribableCounter
public interface Counter extends Meter
Used to measure the rate of change based on calls to increment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Counter.Builder
Fluent builder for counters.-
Nested classes/interfaces inherited from interface org.forgerock.monitoring.api.instrument.Meter
Meter.Id, Meter.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Counter.Builder
builder(String name)
Return the Builder object for this Counter.double
count()
The cumulative count since this counter was created.default void
increment()
Update the counter by one.void
increment(double amount)
Update the counter byamount
.default Iterable<Measurement>
measure()
Get a set of measurements.
-
-
-
Method Detail
-
builder
static Counter.Builder builder(String name)
Return the Builder object for this Counter.- Parameters:
name
- of the Counter- Returns:
- the Builder for a Counter
-
increment
default void increment()
Update the counter by one.
-
increment
void increment(double amount)
Update the counter byamount
.- Parameters:
amount
- Amount to add to the counter.
-
count
double count()
The cumulative count since this counter was created.- Returns:
- double representing the current count of the Counter
-
measure
default Iterable<Measurement> 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.
-
-