|
Kieker 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkieker.monitoring.writer.database.AsyncDbWriter
public final class AsyncDbWriter
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.
Constructor Summary | |
---|---|
AsyncDbWriter()
|
|
AsyncDbWriter(String dbDriverClassname,
String dbConnectionAddress,
String dbTableName,
boolean setInitialExperimentIdBasedOnLastId,
int asyncRecordQueueSize,
boolean blockOnFullQueue)
|
Method Summary | |
---|---|
String |
getInfoString()
Returns a human-readable information string about the writer's configuration and state. |
Vector<AbstractWorkerThread> |
getWorkers()
Returns a vector of workers, or null if none. |
boolean |
init()
Returns false if an error occurs. |
boolean |
init(String initString)
Initialize instance from passed initialization string which is typically a list of separated parameter/values pairs. |
boolean |
newMonitoringRecord(IMonitoringRecord monitoringRecord)
This method is not synchronized, in contrast to the insert method of the Dbconnector.java. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncDbWriter()
public AsyncDbWriter(String dbDriverClassname, String dbConnectionAddress, String dbTableName, boolean setInitialExperimentIdBasedOnLastId, int asyncRecordQueueSize, boolean blockOnFullQueue)
Method Detail |
---|
public boolean init(String initString)
IMonitoringLogWriter
init
in interface IMonitoringLogWriter
initString
- the initialization string
public Vector<AbstractWorkerThread> getWorkers()
IMonitoringLogWriter
getWorkers
in interface IMonitoringLogWriter
public boolean init()
public boolean newMonitoringRecord(IMonitoringRecord monitoringRecord)
newMonitoringRecord
in interface IMonitoringRecordReceiver
monitoringRecord
- the record.
public String getInfoString()
IMonitoringLogWriter
getInfoString
in interface IMonitoringLogWriter
|
Kieker 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |