Class SilverStatisticsManager

  • All Implemented Interfaces:
    Initialization

    @Service
    @Singleton
    public class SilverStatisticsManager
    extends Object
    implements Initialization
    SilverStatisticsManager is the tool used in silverpeas to compute statistics for connexions, files size and components access. This is a singleton class. yet, the single instance is managed by the IoC container that will invoke the initSilverStatisticsManager() method for initializing it.
    Author:
    Marc Guillemin
    • Method Detail

      • init

        public void init()
        Init attributes. This method is invoked by the IoC container. Don't invoke it!
        Specified by:
        init in interface Initialization
      • release

        public void release()
                     throws Exception
        Description copied from interface: Initialization
        Releases the previously initialized resources at Silverpeas shutdown. The implementation of this method is optional. By default it does nothing.
        Specified by:
        release in interface Initialization
        Throws:
        Exception - if an error occurs during the shutdown process. In this case, a log will be outputed and the shutdown goes one.
      • getInstance

        public static SilverStatisticsManager getInstance()
        SilverStatisticsManager is a singleton
        Returns:
        the instance of silver statistics manager
      • addStatVolume

        public void addStatVolume​(String userId,
                                  long volume,
                                  Date dateAccess,
                                  String peasType,
                                  String spaceId,
                                  String componentId)
        Parameters:
        userId - the user identifier
        volume -
        dateAccess - the access date
        peasType -
        spaceId - the space identifier
        componentId - the component instance identifier (silverpeas application)
      • addStatAccess

        public void addStatAccess​(String userId,
                                  Date dateAccess,
                                  String peasType,
                                  String spaceId,
                                  String componentId)
        Add access statistic
        Parameters:
        userId - the user identifier
        dateAccess - the access date
        peasType -
        spaceId - the space identifier
        componentId - the component instance identifier (silverpeas application)
      • addStatConnection

        public void addStatConnection​(String userId,
                                      Date dateConnection,
                                      int count,
                                      long duration)
        Add connection statistic
        Parameters:
        userId - the user identifier
        dateConnection - connection date
        count -
        duration - the connection duration
      • addStatSize

        public void addStatSize​(Date date,
                                String dirName,
                                long dirSize)
        Add statistics size
        Parameters:
        date -
        dirName -
        dirSize -