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
Modifier and TypeMethodDescriptionbooleanbooleanisCallerActivated(String timerName) voidvoidsetActivated(boolean activated) Enables or disables the metrics service.voidsetCallerActivated(String timerName, boolean activated) voidupdateTimer(String timerName, long startTime)
-
Method Details
-
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() -
getCallersStatus
-
setCallerActivated
-
isCallerActivated
-
getMetrics
-
resetMetrics
void resetMetrics() -
updateTimer
-