- All Known Implementing Classes:
GraphListener
public interface RateSummaryListener
Receive the state of the rate when its coalesced.
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double totalValue, long eventCount, double totalEventTime, long period) Called to add rate statistics for a period.default double[]getLastValues(int count) Get the last N data points from persistent storage (if available).
Method Details
add
void add(double totalValue, long eventCount, double totalEventTime, long period) Called to add rate statistics for a period.- Parameters:
totalValue- sum of all event values in the most recent periodeventCount- how many events occurredtotalEventTime- how long the events were running forperiod- how long this period is
getLastValues
default double[] getLastValues(int count) Get the last N data points from persistent storage (if available). Default returns all NaN; override in implementations that store history.- Parameters:
count- number of data points requested- Returns:
- array of length count, NaN-padded where data is unavailable