Class SilverStatisticsManager
- java.lang.Object
-
- org.silverpeas.core.silverstatistics.volume.service.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 theinitSilverStatisticsManager()
method for initializing it.- Author:
- Marc Guillemin
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatAccess(String userId, Date dateAccess, String peasType, String spaceId, String componentId)
Add access statisticvoid
addStatConnection(String userId, Date dateConnection, int count, long duration)
Add connection statisticvoid
addStatSize(Date date, String dirName, long dirSize)
Add statistics sizevoid
addStatVolume(String userId, long volume, Date dateAccess, String peasType, String spaceId, String componentId)
static SilverStatisticsManager
getInstance()
SilverStatisticsManager is a singletonvoid
init()
Init attributes.void
release()
Releases the previously initialized resources at Silverpeas shutdown.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.initialization.Initialization
getPriority
-
-
-
-
Method Detail
-
init
public void init()
Init attributes. This method is invoked by the IoC container. Don't invoke it!- Specified by:
init
in interfaceInitialization
-
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 interfaceInitialization
- 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 identifiervolume
-dateAccess
- the access datepeasType
-spaceId
- the space identifiercomponentId
- 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 identifierdateAccess
- the access datepeasType
-spaceId
- the space identifiercomponentId
- 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 identifierdateConnection
- connection datecount
-duration
- the connection duration
-
-