|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.silverstatistics.control.SilverStatisticsManager
public class SilverStatisticsManager
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.
Method Summary | |
---|---|
void |
addStatAccess(String userId,
Date dateAccess,
String peasType,
String spaceId,
String componentId)
Method declaration |
void |
addStatConnection(String userId,
Date dateConnection,
int count,
long duration)
Method declaration |
void |
addStatSize(Date date,
String dirName,
long dirSize)
Method declaration |
void |
addStatVolume(String userId,
long volume,
Date dateAccess,
String peasType,
String spaceId,
String componentId)
Method declaration |
void |
doCumulStat(Date currentDate)
Method declaration |
void |
doGetStatSize(Date currentDate)
For each directory compute the size of all its files and the size of all its subdirectories recursively. |
void |
doGetStatVolume(Date currentDate)
Method declaration |
static SilverStatisticsManager |
getInstance()
SilverStatisticsManager is a singleton |
void |
initSchedulerStatistics(String aCronString,
String jobName,
String methodeName)
Sets up the scheduling of the specified statistics computation at given moments in time as specified by the Unix-like cron expression. |
void |
initSilverStatisticsManager()
Init attributes. |
void |
jobFailed(SchedulerEvent anEvent)
Invoked when the normal execution thread of a job is broken by an exception. |
void |
jobSucceeded(SchedulerEvent anEvent)
Invoked when the execution of a job has been completed correctly. |
static void |
setInstanceForTest(SilverStatisticsManager instanceForTest)
This method must be used only by unit tests. |
void |
triggerFired(SchedulerEvent anEvent)
Invoked when a job trigger fires the execution of a job. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void initSilverStatisticsManager()
public static SilverStatisticsManager getInstance()
public static void setInstanceForTest(SilverStatisticsManager instanceForTest)
public void initSchedulerStatistics(String aCronString, String jobName, String methodeName) throws SchedulerException, ParseException
aCronString
- the cron expression.jobName
- the name of the computation to schedule.methodeName
- the name of the method that performs the computation.
SchedulerException
- if the computation scheduling failed.
ParseException
- if the cron expression is malformed.public void doGetStatVolume(Date currentDate)
currentDate
-
public void doGetStatSize(Date currentDate) throws ExecutionException, InterruptedException
currentDate
-
ExecutionException
InterruptedException
public void doCumulStat(Date currentDate)
currentDate
-
public void addStatVolume(String userId, long volume, Date dateAccess, String peasType, String spaceId, String componentId)
userId
- volume
- dateAccess
- peasType
- spaceId
- componentId
-
public void addStatAccess(String userId, Date dateAccess, String peasType, String spaceId, String componentId)
userId
- dateAccess
- peasType
- spaceId
- componentId
-
public void addStatConnection(String userId, Date dateConnection, int count, long duration)
userId
- dateConnection
- count
- duration
-
public void addStatSize(Date date, String dirName, long dirSize)
date
- dirName
- dirSize
-
public void triggerFired(SchedulerEvent anEvent) throws Exception
SchedulerEventListener
triggerFired
in interface SchedulerEventListener
anEvent
- the event coming from the trigger firing.
Exception
public void jobSucceeded(SchedulerEvent anEvent)
SchedulerEventListener
jobSucceeded
in interface SchedulerEventListener
anEvent
- the event coming from the job completion.public void jobFailed(SchedulerEvent anEvent)
SchedulerEventListener
jobFailed
in interface SchedulerEventListener
anEvent
- the event coming from the job failure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |