| java.lang.Object org.sakaiproject.event.impl.BaseEventTrackingService org.sakaiproject.event.impl.ClusterEventTracking
All known Subclasses: org.sakaiproject.event.impl.EventTrackingTest,
ClusterEventTracking | abstract public class ClusterEventTracking extends BaseEventTrackingService implements Runnable(Code) | |
ClusterEventTracking is the implmentation for the EventTracking service for use in a clustered multi-app server configuration.
Events are backed in the cluster database, and this database is polled to read and process locally events posted by the other cluster members.
|
Field Summary | |
protected boolean | m_autoDdl Configuration: to run the ddl on init or not. | protected boolean | m_batchWrite If true, batch events for bulk write. | protected boolean | m_checkDb Unless false, check the db for events from the other cluster servers. | protected Collection | m_eventQueue Queue of events to write if we are batching. | protected long | m_lastEventSeq | protected static String | m_logId | protected long | m_period How long to wait between checks for new events from the db. | protected Thread | m_thread The db event checker thread. | protected boolean | m_threadStop The thread quit flag. |
m_autoDdl | protected boolean m_autoDdl(Code) | | Configuration: to run the ddl on init or not.
|
m_batchWrite | protected boolean m_batchWrite(Code) | | If true, batch events for bulk write.
|
m_checkDb | protected boolean m_checkDb(Code) | | Unless false, check the db for events from the other cluster servers.
|
m_eventQueue | protected Collection m_eventQueue(Code) | | Queue of events to write if we are batching.
|
m_lastEventSeq | protected long m_lastEventSeq(Code) | | Last event code read from the db
|
m_logId | protected static String m_logId(Code) | | String used to identify this service in the logs
|
m_period | protected long m_period(Code) | | How long to wait between checks for new events from the db.
|
m_thread | protected Thread m_thread(Code) | | The db event checker thread.
|
m_threadStop | protected boolean m_threadStop(Code) | | The thread quit flag.
|
bindValues | protected void bindValues(Event event, Object[] fields)(Code) | | Bind the event values into an array of fields for inserting.
Parameters: event - The event to write. Parameters: fields - The object[] to hold bind variables. |
destroy | public void destroy()(Code) | | Final cleanup.
|
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
initLastEvent | protected void initLastEvent()(Code) | | Check the db for the largest event seq number, and set this as the one after which we will next get event.
|
insertStatement | protected String insertStatement()(Code) | | Form the proper event insert statement for the database technology.
The SQL insert statement for writing an event. |
postEvent | protected void postEvent(Event event)(Code) | | Cause this new event to get to wherever it has to go for persistence, etc.
Parameters: event - The new event to post. |
run | public void run()(Code) | | Run the event checking thread.
|
setAutoDdl | public void setAutoDdl(String value)(Code) | | Configuration: to run the ddl on init or not.
Parameters: value - the auto ddl value. |
setBatchWrite | public void setBatchWrite(String value)(Code) | | Configuration: set the batch writing flag.
Parameters: value - The batch writing value. |
setCheckDb | public void setCheckDb(String value)(Code) | | Configuration: set the check-db.
Parameters: value - The check-db value. |
setPeriod | public void setPeriod(String time)(Code) | | Set the # seconds to wait between db checks for new events.
Parameters: time - The # seconds to wait between db checks for new events. |
sqlService | abstract protected SqlService sqlService()(Code) | | the MemoryService collaborator. |
start | protected void start()(Code) | | Start the clean and report thread.
|
stop | protected void stop()(Code) | | Stop the clean and report thread.
|
timeService | abstract protected TimeService timeService()(Code) | | the TimeService collaborator. |
writeBatchEvents | protected void writeBatchEvents(Collection events)(Code) | | Write a batch of events to the db
Parameters: events - The collection of event to write. |
writeEvent | protected void writeEvent(Event event, Connection conn)(Code) | | Write a single event to the db
Parameters: event - The event to write. |
Fields inherited from org.sakaiproject.event.impl.BaseEventTrackingService | protected MyObservable m_localObservableHelper(Code)(Java Doc) protected MyObservable m_observableHelper(Code)(Java Doc) protected MyObservable m_priorityObservableHelper(Code)(Java Doc)
|
|
|