kieker.monitoring.writer.database
Class AsyncDbWriter
java.lang.Object
kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.AbstractAsyncWriter
kieker.monitoring.writer.database.AsyncDbWriter
- All Implemented Interfaces:
- IMonitoringRecordReceiver, IMonitoringWriter
public final class AsyncDbWriter
- extends AbstractAsyncWriter
Stores monitoring data into a database.
Warning ! This class is an academic prototype and not intended for
reliability or availability critical systems.
The insertMonitoringData methods are thread-save (also in combination with
experimentId changes), so that they may be used by multiple threads at the
same time. We have tested this in various applications, in combination with
the standard mysql-Jconnector database driver.
Our experience shows that it is not a major bottleneck if not too many
measurement points are used (e.g., 30/second). However, there are much
performance tuning possible in this class. For instance, performance
optimization should be possible by using a connection pool instead of a
single database connection. The current version uses prepared statements.
Alternatively, it could be tuned by collecting multiple database commands
before sending it to the database.
- Author:
- Matthias Rohr, Jan Waller
History (Build) (change the String BUILD when this file is changed):
2008/05/29: Changed vmid to vmname (defaults to hostname), which may
be changed during runtime 2007/07/30: Initial Prototype
Method Summary |
void |
init()
Implementing classes should indicate an initialization
error by throwing an Exception . |
CONFIG_DRIVERCLASSNAME
public static final String CONFIG_DRIVERCLASSNAME
CONFIG_CONNECTIONSTRING
public static final String CONFIG_CONNECTIONSTRING
CONFIG_TABLENAME
public static final String CONFIG_TABLENAME
CONFIG_NRCONN
public static final String CONFIG_NRCONN
AsyncDbWriter
public AsyncDbWriter(Configuration configuration)
throws Exception
- Throws:
Exception
init
public void init()
throws Exception
- Description copied from class:
AbstractMonitoringWriter
- Implementing classes should indicate an initialization
error by throwing an
Exception
.
- Throws:
Exception
Copyright 2011 the Kieker Project, http://kieker.sourceforge.net>