Jive Forums API (5.5.8) Developer Javadocs

com.jivesoftware.base.stats
Class ReadStatsManager

java.lang.Object
  extended by com.jivesoftware.base.stats.ReadStatsManager
Direct Known Subclasses:
ForumsReadStatsManager

public class ReadStatsManager
extends java.lang.Object

Manager for read statistics in the Jive Platform products. This class handles adding new read stats and read sessions.

This API is really only write-only - there's no way to get a list of read stats or sessions from this class - it's assumed this will be done in the reports classes.

See Also:
ReadStat, ReadStatSession

Nested Class Summary
static class ReadStatsManager.BytesTask
          An internal class which updates the bytesSent field of a HTTPReadStatSession or NNTPReadStatSession object to the database.
static class ReadStatsManager.PersistenceTask
          An internal class which saves sessions and read stats to the database.
 
Field Summary
protected  ReadStatsManager.BytesTask bytesTask
           
protected  ReadStatsManager.PersistenceTask persistenceTask
           
protected  java.util.List readStats
           
protected  java.util.List sessions
           
protected  java.util.Map updatedSessions
           
 
Constructor Summary
ReadStatsManager()
           
 
Method Summary
 void addReadStat(ReadStat readStat)
          Adds a new read stat.
 void addReadStatSession(ReadStatSession session)
          Adds a new read stat session.
 void clearReadStats(java.util.Date date)
          Clears read stats entries from the database for every date prior to the one specified.
protected  ReadStatsManager.BytesTask createBytesTask()
           
protected  ReadStatsManager.PersistenceTask createPersistenceTask()
           
 ReadStatsManager.BytesTask getBytesTask()
          Returns the 'bytes sent' persistence task.
 ReadStatsManager.PersistenceTask getPersistenceTask()
          Returns the persistence thread.
static boolean isReadStatsEnabled()
           
 void saveReadStatSession(ReadStatSession session)
          Saves (updates) the given session.
protected  void validateLicense()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessions

protected java.util.List sessions

updatedSessions

protected java.util.Map updatedSessions

readStats

protected java.util.List readStats

persistenceTask

protected ReadStatsManager.PersistenceTask persistenceTask

bytesTask

protected ReadStatsManager.BytesTask bytesTask
Constructor Detail

ReadStatsManager

public ReadStatsManager()
Method Detail

validateLicense

protected void validateLicense()

createBytesTask

protected ReadStatsManager.BytesTask createBytesTask()

createPersistenceTask

protected ReadStatsManager.PersistenceTask createPersistenceTask()

isReadStatsEnabled

public static boolean isReadStatsEnabled()

getPersistenceTask

public ReadStatsManager.PersistenceTask getPersistenceTask()
Returns the persistence thread.


getBytesTask

public ReadStatsManager.BytesTask getBytesTask()
Returns the 'bytes sent' persistence task.


addReadStatSession

public void addReadStatSession(ReadStatSession session)
Adds a new read stat session. Internally, this object is queued for saving.

Parameters:
session - a new read stat session.

saveReadStatSession

public void saveReadStatSession(ReadStatSession session)
Saves (updates) the given session. Internally, this object is queued then updated later.

Parameters:
session - a read stat session.

addReadStat

public void addReadStat(ReadStat readStat)
Adds a new read stat. Internally, this object is queued for saving.

Parameters:
readStat - a new read stat object.

clearReadStats

public void clearReadStats(java.util.Date date)
Clears read stats entries from the database for every date prior to the one specified.

Parameters:
date - clears read stats prior to this date

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.