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 Details

    • DefaultStatisticsService

      public DefaultStatisticsService()
  • Method Details

    • setInterval

      public void setInterval(long interval)
    • setDataHolder

      public void setDataHolder(StatisticsData dataHolder)
    • addCollector

      public boolean addCollector(BasicStatisticsCollector collector)
      Description copied from interface: StatisticsService
      Adds the StatisticsCollector collector to the StatisticsService.
      Specified by:
      addCollector in interface StatisticsService
      Parameters:
      collector - The StatisticsCollector to add to the StatisticsSerice.
      Returns:
      boolean Indicating, if Adding was successful.
    • removeCollector

      public boolean removeCollector(String name)
      Description copied from interface: StatisticsService
      Removes the StatisticsCollector identified by name to the StatisticsService.
      Specified by:
      removeCollector in interface StatisticsService
      Parameters:
      name - The name of the new StatisticsService to remove.
      Returns:
      boolean Indicating, if Removal was successful.
    • addChart

      public boolean addChart(StatisticsChart chart)
      Description copied from interface: StatisticsService
      Adds all StatisticsCollectors in StatisticsChart chart to the StatisticsService.
      Specified by:
      addChart in interface StatisticsService
      Parameters:
      chart - The StatisticsChart containing the collectors that should be add.
      Returns:
      boolean Indicating, if Adding was successful.
    • removeChart

      public boolean removeChart(String name)
      Description copied from interface: StatisticsService
      Removes all StatisticsCollectors contained in StatisticsChart identified by name.
      Specified by:
      removeChart in interface StatisticsService
      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:
      destroy in interface org.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:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • getChart

      public StatisticsChart getChart(String name)
      Description copied from interface: StatisticsService
      Returns the StatisticsChart identified by name, if available. Otherwise returns null.
      Specified by:
      getChart in interface StatisticsService
    • setCharts

      public void setCharts(Collection<StatisticsChart> charts)
    • setCollectors

      public void setCollectors(Collection<BasicStatisticsCollector> collectors)
    • setStandaloneEnabled

      public void setStandaloneEnabled(boolean standaloneEnabled)