Package org.apache.flink.runtime.metrics
Class ThresholdMeter
- java.lang.Object
-
- org.apache.flink.runtime.metrics.ThresholdMeter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ThresholdMeter.ThresholdExceedException
Exception thrown when a threshold exceeds.
-
Constructor Summary
Constructors Constructor Description ThresholdMeter(double maxEventsPerInterval, Duration interval)
ThresholdMeter(double maxEventsPerInterval, Duration interval, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAgainstThreshold()
long
getCount()
Get number of events marked on the meter.double
getRate()
Returns the current rate of events per second.void
markEvent()
Mark occurrence of an event.void
markEvent(long n)
Mark occurrence of multiple events.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.metrics.Meter
getMetricType
-
-
-
-
Constructor Detail
-
ThresholdMeter
public ThresholdMeter(double maxEventsPerInterval, Duration interval)
-
ThresholdMeter
@VisibleForTesting public ThresholdMeter(double maxEventsPerInterval, Duration interval, Clock clock)
-
-
Method Detail
-
markEvent
public void markEvent()
Description copied from interface:Meter
Mark occurrence of an event.
-
markEvent
public void markEvent(long n)
Description copied from interface:Meter
Mark occurrence of multiple events.
-
getRate
public double getRate()
Description copied from interface:Meter
Returns the current rate of events per second.
-
getCount
public long getCount()
Description copied from interface:Meter
Get number of events marked on the meter.
-
checkAgainstThreshold
public void checkAgainstThreshold() throws ThresholdMeter.ThresholdExceedException
-
-