Package org.apache.unomi.metrics
Interface MetricsService
-
- All Known Implementing Classes:
MetricsServiceImpl
public interface MetricsService
This is the main interface for the metrics service, that makes it possible to count calls, callers and accumulated times for sections of code.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Boolean>
getCallersStatus()
Map<String,Metric>
getMetrics()
boolean
isActivated()
boolean
isCallerActivated(String timerName)
void
resetMetrics()
void
setActivated(boolean activated)
Enables or disables the metrics service.void
setCallerActivated(String timerName, boolean activated)
void
updateTimer(String timerName, long startTime)
-
-
-
Method Detail
-
setActivated
void setActivated(boolean activated)
Enables or disables the metrics service.- Parameters:
activated
- if true the metrics service will be activated, false will deactivate it and clear any exists in-memory metrics
-
isActivated
boolean isActivated()
-
setCallerActivated
void setCallerActivated(String timerName, boolean activated)
-
isCallerActivated
boolean isCallerActivated(String timerName)
-
resetMetrics
void resetMetrics()
-
updateTimer
void updateTimer(String timerName, long startTime)
-
-