|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.monitor.AbstractMonitor<java.lang.Number>
com.netflix.servo.monitor.BasicCounter
public final class BasicCounter
A simple counter implementation backed by an AtomicLong.
The value is the total count for the life of the counter. Observers are responsible
for converting to a rate and handling overflows if they occur.
| Field Summary |
|---|
| Fields inherited from class com.netflix.servo.monitor.AbstractMonitor |
|---|
config |
| Constructor Summary | |
|---|---|
BasicCounter(MonitorConfig config)
Creates a new instance of the counter. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Number |
getValue()
Returns the current value for the monitor. |
int |
hashCode()
|
void |
increment()
Update the count by one. |
void |
increment(long amount)
Update the count by the specified amount. |
java.lang.String |
toString()
|
| Methods inherited from class com.netflix.servo.monitor.AbstractMonitor |
|---|
getConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.netflix.servo.monitor.Monitor |
|---|
getConfig |
| Constructor Detail |
|---|
public BasicCounter(MonitorConfig config)
| Method Detail |
|---|
public void increment()
increment in interface Counterpublic void increment(long amount)
increment in interface Counterpublic java.lang.Number getValue()
getValue in interface Monitor<java.lang.Number>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||