Package org.kiwiproject.beta.metrics
Class NamedMeter
java.lang.Object
com.codahale.metrics.Meter
org.kiwiproject.beta.metrics.NamedMeter
- All Implemented Interfaces:
com.codahale.metrics.Counting,com.codahale.metrics.Metered,com.codahale.metrics.Metric
@Beta
public class NamedMeter
extends com.codahale.metrics.Meter
A Metrics
Meter that knows its own name.-
Method Summary
Modifier and TypeMethodDescriptionlonggetCount()doubledoubledoublecom.codahale.metrics.MetergetMeter()Allows access to the decoratedMeterinstance.getName()Get the name of theMeter.doublevoidmark()voidmark(long n) static NamedMeterCreates a newNamedMeterwhich delegates to the providedMeter.toString()
-
Method Details
-
of
Creates a newNamedMeterwhich delegates to the providedMeter.- Parameters:
name- the name for this metermeterDelegate- theMeterdelegate that method calls will be forwarded to- Returns:
- a new instance
-
toString
- Overrides:
toStringin classObject- Returns:
- the name of this Meter
- Implementation Note:
- This does not include any additional information from the Meter, because calling the methods
in a Meter causes changes to occur internally (since it is time-dependent) and a
toString()should not cause any internal state changes in an object.
-
getName
Get the name of theMeter. -
getMeter
public com.codahale.metrics.Meter getMeter()Allows access to the decoratedMeterinstance. Normally this won't be necessary since calls toMeteredmethods are delegated to and because this class extendsMeter, which allows it to be passed directly to any methods that accept aMeter, e.g., aTimerrequires aMeterin one of its constructors. -
mark
public void mark()- Overrides:
markin classcom.codahale.metrics.Meter
-
mark
public void mark(long n) - Overrides:
markin classcom.codahale.metrics.Meter
-
getCount
public long getCount()- Specified by:
getCountin interfacecom.codahale.metrics.Counting- Specified by:
getCountin interfacecom.codahale.metrics.Metered- Overrides:
getCountin classcom.codahale.metrics.Meter
-
getFifteenMinuteRate
public double getFifteenMinuteRate()- Specified by:
getFifteenMinuteRatein interfacecom.codahale.metrics.Metered- Overrides:
getFifteenMinuteRatein classcom.codahale.metrics.Meter
-
getFiveMinuteRate
public double getFiveMinuteRate()- Specified by:
getFiveMinuteRatein interfacecom.codahale.metrics.Metered- Overrides:
getFiveMinuteRatein classcom.codahale.metrics.Meter
-
getMeanRate
public double getMeanRate()- Specified by:
getMeanRatein interfacecom.codahale.metrics.Metered- Overrides:
getMeanRatein classcom.codahale.metrics.Meter
-
getOneMinuteRate
public double getOneMinuteRate()- Specified by:
getOneMinuteRatein interfacecom.codahale.metrics.Metered- Overrides:
getOneMinuteRatein classcom.codahale.metrics.Meter
-