public class IntegerCounter extends Counter
Constructor and Description |
---|
IntegerCounter(String category,
String name,
com.google.common.collect.ImmutableMap<String,String> tags) |
Modifier and Type | Method and Description |
---|---|
Optional<CounterSnapshot> |
flush()
If the counter has no data, returns an absent value.
|
long |
get() |
void |
inc() |
void |
inc(long delta) |
public void inc()
public void inc(long delta)
public long get()
public Optional<CounterSnapshot> flush()
Counter
Otherwise, creates a snapshot of the current internal state of the counter builder, resets the counter, then returns the snapshot.