Class MetricsServiceImpl
- java.lang.Object
-
- org.apache.unomi.metrics.internal.MetricsServiceImpl
-
- All Implemented Interfaces:
MetricsService
public class MetricsServiceImpl extends Object implements MetricsService
-
-
Constructor Summary
Constructors Constructor Description MetricsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Boolean>getCallersStatus()Map<String,Metric>getMetrics()booleanisActivated()booleanisCallerActivated(String timerName)voidresetMetrics()voidsetActivated(boolean activated)Enables or disables the metrics service.voidsetCallerActivated(String timerName, boolean activated)voidupdateTimer(String timerName, long startTime)
-
-
-
Method Detail
-
setActivated
public void setActivated(boolean activated)
Description copied from interface:MetricsServiceEnables or disables the metrics service.- Specified by:
setActivatedin interfaceMetricsService- Parameters:
activated- if true the metrics service will be activated, false will deactivate it and clear any exists in-memory metrics
-
isActivated
public boolean isActivated()
- Specified by:
isActivatedin interfaceMetricsService
-
getMetrics
public Map<String,Metric> getMetrics()
- Specified by:
getMetricsin interfaceMetricsService
-
resetMetrics
public void resetMetrics()
- Specified by:
resetMetricsin interfaceMetricsService
-
updateTimer
public void updateTimer(String timerName, long startTime)
- Specified by:
updateTimerin interfaceMetricsService
-
getCallersStatus
public Map<String,Boolean> getCallersStatus()
- Specified by:
getCallersStatusin interfaceMetricsService
-
setCallerActivated
public void setCallerActivated(String timerName, boolean activated)
- Specified by:
setCallerActivatedin interfaceMetricsService
-
isCallerActivated
public boolean isCallerActivated(String timerName)
- Specified by:
isCallerActivatedin interfaceMetricsService
-
-