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()
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
public void setActivated(boolean activated)
Description copied from interface:MetricsService
Enables or disables the metrics service.- Specified by:
setActivated
in 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:
isActivated
in interfaceMetricsService
-
getMetrics
public Map<String,Metric> getMetrics()
- Specified by:
getMetrics
in interfaceMetricsService
-
resetMetrics
public void resetMetrics()
- Specified by:
resetMetrics
in interfaceMetricsService
-
updateTimer
public void updateTimer(String timerName, long startTime)
- Specified by:
updateTimer
in interfaceMetricsService
-
getCallersStatus
public Map<String,Boolean> getCallersStatus()
- Specified by:
getCallersStatus
in interfaceMetricsService
-
setCallerActivated
public void setCallerActivated(String timerName, boolean activated)
- Specified by:
setCallerActivated
in interfaceMetricsService
-
isCallerActivated
public boolean isCallerActivated(String timerName)
- Specified by:
isCallerActivated
in interfaceMetricsService
-
-