|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.publish.BaseMetricObserver
public abstract class BaseMetricObserver
Helper class for metric observers that keeps track of the number of calls and number of failures.
| Constructor Summary | |
|---|---|
BaseMetricObserver(java.lang.String name)
Creates a new instance with a given name. |
|
| Method Summary | |
|---|---|
int |
getFailedUpdateCount()
Returns the number of times update failed with an exception. |
java.lang.String |
getName()
Name associated with an observer. |
int |
getUpdateCount()
Returns the total number of times update has been called. |
protected void |
incrementFailedCount()
Can be used by sub-classes to increment the failed count if they handle exception internally. |
void |
update(java.util.List<Metric> metrics)
Invoked with the most recent values for a set of metrics. |
abstract void |
updateImpl(java.util.List<Metric> metrics)
Update method that should be defined by sub-classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseMetricObserver(java.lang.String name)
| Method Detail |
|---|
public abstract void updateImpl(java.util.List<Metric> metrics)
public final void update(java.util.List<Metric> metrics)
update in interface MetricObserverpublic final java.lang.String getName()
getName in interface MetricObserverprotected final void incrementFailedCount()
public int getUpdateCount()
public int getFailedUpdateCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||