public class FrequentEventDetector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FrequentEventDetector.Level |
Constructor and Description |
---|
FrequentEventDetector(int eventCountThreshold,
int timeSpanMs) |
FrequentEventDetector(int eventCountThreshold,
int timeSpanMs,
FrequentEventDetector.Level level) |
Modifier and Type | Method and Description |
---|---|
static void |
disableUntil(Disposable reenable) |
void |
eventHappened(java.lang.Object event)
Logs a message if the given event is part of a "frequent" series.
|
java.lang.String |
getMessageOnEvent(java.lang.Object event) |
void |
logMessage(java.lang.String message) |
public FrequentEventDetector(int eventCountThreshold, int timeSpanMs)
public FrequentEventDetector(int eventCountThreshold, int timeSpanMs, FrequentEventDetector.Level level)
public java.lang.String getMessageOnEvent(java.lang.Object event)
public void logMessage(java.lang.String message)
public void eventHappened(java.lang.Object event)
getMessageOnEvent(Object)
public static void disableUntil(Disposable reenable)