com.netflix.servo.monitor
Interface ResettableMonitor<T>

All Superinterfaces:
Monitor<T>
All Known Implementing Classes:
MaxGauge, MinGauge, PeakRateCounter, ResettableCounter

public interface ResettableMonitor<T>
extends Monitor<T>

Used to indicate a monitor that should be reset after sampling. If there are multiple pollers reading the value only one of them should be configured to reset the value. The Monitor.getValue() call will not reset the value so it can be sample many times.


Method Summary
 T getAndResetValue()
          Return the value and reset the monitor state for the default polling interval.
 T getAndResetValue(int pollerIdx)
          Return the value and reset the monitor state for a given polling interval.
 
Methods inherited from interface com.netflix.servo.monitor.Monitor
getConfig, getValue
 

Method Detail

getAndResetValue

T getAndResetValue()
Return the value and reset the monitor state for the default polling interval.


getAndResetValue

T getAndResetValue(int pollerIdx)
Return the value and reset the monitor state for a given polling interval. This allows us to support multiple pollers, for example a 10second and 60second poller.