public class SiteActivityQueue
extends java.lang.Object
implements java.io.Serializable
SiteActivity and SiteActivityPage
objects during session processing.
A java.util.Timer and a java.util.TimerTask are used to
control when persistence occurs. The timer invokes the task at regularly
specified intervals, at which time the task determines if any unpersisted
objects are in the queue and, if so, processes them accordingly.
| Modifier and Type | Class and Description |
|---|---|
private static class |
SiteActivityQueue.PersistTask
A timer task used to persist the queue of
SiteActivity and
SiteActivityPage objects. |
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.ArrayList<JDBCObject<?>> |
cvCache
A cache of the activities processed.
|
private static int |
cvLoggingFlag
A flag that indicates if activity history logging is turned on.
|
private static java.util.Timer |
cvPersistTimer
The timer used to control how often an empty queue is checked
for new entries.
|
protected static java.util.ArrayList<JDBCObject<?>> |
cvQueue
The queue of
SiteActivity and SiteActivityPage
objects. |
private static long |
serialVersionUID
The class' serialization version id.
|
| Constructor and Description |
|---|
SiteActivityQueue() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToQueue(SiteActivity sa)
Adds a
SiteActivity object to the end of the queue. |
static void |
addToQueue(SiteActivityPage sap)
Adds a
SiteActivityPage object to the end of the queue. |
static boolean |
loggingPages()
Answers if accessed pages are being logged.
|
static boolean |
loggingSessions()
Answers if session activity is being logged.
|
static void |
removeFromCache(SiteActivity sa)
Removes a
SiteActivity object from the activity cache. |
private static final long serialVersionUID
private static int cvLoggingFlag
private static java.util.Timer cvPersistTimer
protected static java.util.ArrayList<JDBCObject<?>> cvQueue
SiteActivity and SiteActivityPage
objects.protected static java.util.ArrayList<JDBCObject<?>> cvCache
SiteActivity or SiteActivityPage
object needs to be added or updated.public static void addToQueue(SiteActivity sa)
SiteActivity object to the end of the queue.
Typically only invoked by DefaultServlet.queueActivity.sa - (SiteActivity) The SiteActivity object that
is to be added to the queue.public static void addToQueue(SiteActivityPage sap)
SiteActivityPage object to the end of the queue.
Typically only invoked by DefaultServlet doGet()
and doPost() methods.sap - (SiteActivityPage) The SiteActivityPage object
that is to be added to the queue.public static void removeFromCache(SiteActivity sa)
SiteActivity object from the activity cache.
Invoked by a SiteActivity object when it is either removed
from its session or when the session it is associated with times-out.sa - (SiteActivity) The SiteActivity object that
is to be removed from the cache.public static boolean loggingPages()
true if pages are being logged,
otherwise false.public static boolean loggingSessions()
true if sessions are being logged,
otherwise false.