|
Kieker 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kieker.monitoring.writer.filesystem.SyncFsWriter
public final class SyncFsWriter
Simple class to store monitoroing data in the file system. Although a buffered writer is used, outliers (delays of 1000 ms) occur from time to time if many monitoring events have to be writen. We believe that outliers result from a flush on the buffer of the writer. A more sophisticated writer to store data in the file system is the AsyncFsWriter. This does not introduce the outliers that result from flushing the writing buffer, since provides an asynchronous insertMonitoringData method. However, the AsyncFsWriter introduces a little more overhead because a writing queue is required and it isn't tested as much as the FileSystenWriter. Additionally, the resource demands (CPU, bus etc.) for writing monitoring data are not anymore occurring during the time of the execution that is monitored, but at some other (unknown) time. The AsyncFsWriter should usually be used instead of this class to avoid the outliers described above. The asyncFsWriter is not(!) faster (but also it shouldn't be much slower) because only one thread is used for writing into a single file. To tune it, it might be an option to write to multiple files, while writing with more than one thread into a single file is not considered a save option.
Constructor Summary | |
---|---|
SyncFsWriter()
|
|
SyncFsWriter(String storagePathBase)
|
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(String initString)
Initialize instance from passed initialization string which is typically a list of separated parameter/values pairs. |
boolean |
newMonitoringRecord(IMonitoringRecord monitoringRecord)
Called for each new record. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SyncFsWriter()
public SyncFsWriter(String storagePathBase)
Method Detail |
---|
public boolean init(String initString)
IMonitoringLogWriter
init
in interface IMonitoringLogWriter
initString
- the initialization string
public boolean newMonitoringRecord(IMonitoringRecord monitoringRecord)
IMonitoringRecordReceiver
newMonitoringRecord
in interface IMonitoringRecordReceiver
monitoringRecord
- the record.
public Vector<AbstractWorkerThread> getWorkers()
IMonitoringLogWriter
getWorkers
in interface IMonitoringLogWriter
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 |