Class DefaultStatisticsService
java.lang.Object
de.hybris.platform.servicelayer.stats.DefaultStatisticsService
- All Implemented Interfaces:
StatisticsService,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class DefaultStatisticsService
extends Object
implements StatisticsService, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Default StatisticsService for collecting data for use in hAC-charts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChart(StatisticsChart chart) Adds allStatisticsCollectors inStatisticsChartchart to the StatisticsService.booleanaddCollector(BasicStatisticsCollector collector) Adds theStatisticsCollectorcollector to the StatisticsService.voidFinish initializing, register the not yet registered collectors in collector map and chart map at dataholder and start the StatDaemon-Thread, when DefaultStatisticsService was created by Spring.voiddestroy()Stop the StatisticsDaemon-Thread.Returns theStatisticsChartidentified by name, if available.booleanremoveChart(String name) Removes allStatisticsCollectors contained inStatisticsChartidentified by name.booleanremoveCollector(String name) Removes theStatisticsCollectoridentified by name to the StatisticsService.voidsetCharts(Collection<StatisticsChart> charts) voidsetCollectors(Collection<BasicStatisticsCollector> collectors) voidsetDataHolder(StatisticsData dataHolder) voidsetInterval(long interval) voidsetStandaloneEnabled(boolean standaloneEnabled)
-
Constructor Details
-
DefaultStatisticsService
public DefaultStatisticsService()
-
-
Method Details
-
setInterval
public void setInterval(long interval) -
setDataHolder
-
addCollector
Description copied from interface:StatisticsServiceAdds theStatisticsCollectorcollector to the StatisticsService.- Specified by:
addCollectorin interfaceStatisticsService- Parameters:
collector- The StatisticsCollector to add to the StatisticsSerice.- Returns:
- boolean Indicating, if Adding was successful.
-
removeCollector
Description copied from interface:StatisticsServiceRemoves theStatisticsCollectoridentified by name to the StatisticsService.- Specified by:
removeCollectorin interfaceStatisticsService- Parameters:
name- The name of the new StatisticsService to remove.- Returns:
- boolean Indicating, if Removal was successful.
-
addChart
Description copied from interface:StatisticsServiceAdds allStatisticsCollectors inStatisticsChartchart to the StatisticsService.- Specified by:
addChartin interfaceStatisticsService- Parameters:
chart- The StatisticsChart containing the collectors that should be add.- Returns:
- boolean Indicating, if Adding was successful.
-
removeChart
Description copied from interface:StatisticsServiceRemoves allStatisticsCollectors contained inStatisticsChartidentified by name.- Specified by:
removeChartin interfaceStatisticsService- Parameters:
name- The name of the StatisticsChart containing the StatisticsCollectors to remove.- Returns:
- boolean Indicating, if Removal was successful.
-
destroy
public void destroy()Stop the StatisticsDaemon-Thread.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
afterPropertiesSet
public void afterPropertiesSet()Finish initializing, register the not yet registered collectors in collector map and chart map at dataholder and start the StatDaemon-Thread, when DefaultStatisticsService was created by Spring.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getChart
Description copied from interface:StatisticsServiceReturns theStatisticsChartidentified by name, if available. Otherwise returns null.- Specified by:
getChartin interfaceStatisticsService
-
setCharts
-
setCollectors
-
setStandaloneEnabled
public void setStandaloneEnabled(boolean standaloneEnabled)
-