Kieker 1.4

kieker.monitoring.writer.database
Class AsyncDbWriter

java.lang.Object
  extended by kieker.monitoring.writer.AbstractMonitoringWriter
      extended by kieker.monitoring.writer.AbstractAsyncWriter
          extended by 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

Field Summary
static String CONFIG_CONNECTIONSTRING
           
static String CONFIG_DRIVERCLASSNAME
           
static String CONFIG_NRCONN
           
static String CONFIG_TABLENAME
           
 
Constructor Summary
AsyncDbWriter(Configuration configuration)
           
 
Method Summary
 void init()
          Implementing classes should indicate an initialization error by throwing an Exception.
 
Methods inherited from class kieker.monitoring.writer.AbstractAsyncWriter
newMonitoringRecord, terminate, toString
 
Methods inherited from class kieker.monitoring.writer.AbstractMonitoringWriter
getConfiguration, setController
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

AsyncDbWriter

public AsyncDbWriter(Configuration configuration)
              throws Exception
Throws:
Exception
Method Detail

init

public void init()
          throws Exception
Description copied from class: AbstractMonitoringWriter
Implementing classes should indicate an initialization error by throwing an Exception.

Throws:
Exception

Kieker 1.4

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net