org.apache.jetspeed.statistics.impl
Class BatchedStatistics
java.lang.Object
org.apache.jetspeed.statistics.impl.BatchedStatistics
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- BatchedPageStatistics, BatchedPortletStatistics, BatchedUserStatistics
public abstract class BatchedStatistics
- extends java.lang.Object
- implements java.lang.Runnable
BatchedStatistics
- Version:
- $Id: TestPortletEntityDAO.java,v 1.3 2005/05/24 14:43:19 ate Exp $
- Author:
- Chris Schaefer , David Sean Taylor
Constructor Summary |
BatchedStatistics(javax.sql.DataSource ds,
int batchSize,
long msElapsedTimeThreshold,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thread
protected java.lang.Thread thread
msLastFlushTime
protected long msLastFlushTime
batchSize
protected int batchSize
msElapsedTimeThreshold
protected long msElapsedTimeThreshold
logRecords
protected java.util.List logRecords
ds
protected javax.sql.DataSource ds
name
protected java.lang.String name
BatchedStatistics
public BatchedStatistics(javax.sql.DataSource ds,
int batchSize,
long msElapsedTimeThreshold,
java.lang.String name)
startThread
public void startThread()
getConnection
protected java.sql.Connection getConnection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
addStatistic
public void addStatistic(LogRecord logRecord)
isDone
public boolean isDone()
tellThreadToStop
public void tellThreadToStop()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
flush
public void flush()
getPreparedStatement
protected abstract java.sql.PreparedStatement getPreparedStatement(java.sql.Connection con)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
loadOneRecordToStatement
protected abstract void loadOneRecordToStatement(java.sql.PreparedStatement stm,
LogRecord rec)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
canDoRecordType
public abstract boolean canDoRecordType(LogRecord rec)
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.