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