com.xpn.xwiki.plugin.activitystream.impl
Class ActivityStreamCleaner
java.lang.Object
com.xpn.xwiki.plugin.activitystream.impl.ActivityStreamCleaner
public final class ActivityStreamCleaner
- extends Object
Manager for the activitystream cleaning feature. The cleaning consist in deleting old events to prevent infinite
growth of the activitystream table in the database.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static ActivityStreamCleaner getInstance()
- Returns:
- a unique instance of ActivityStreamCleaner. Thread safe.
getNumberOfDaysToKeep
public static int getNumberOfDaysToKeep(XWikiContext context)
- Parameters:
context
- the XWiki context
- Returns:
- the number of days activitystream events should be kept (default: infinite duration).
init
public void init(XWikiContext context)
throws XWikiException
- Method that must be called on plugin init. Create the scheduler job.
- Parameters:
context
- the XWiki context
- Throws:
XWikiException
- if the job creation failed