kieker.monitoring.writer.filesystem
Class SyncFsWriter
java.lang.Object
   kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.AbstractMonitoringWriter
       kieker.monitoring.writer.filesystem.SyncFsWriter
kieker.monitoring.writer.filesystem.SyncFsWriter
- All Implemented Interfaces: 
- IMonitoringRecordReceiver, IMonitoringWriter
- public final class SyncFsWriter 
- extends AbstractMonitoringWriter
Simple class to store monitoring 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 written. 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.
- Since:
- < 0.9
- Author:
- Matthias Rohr, Andre van Hoorn, Jan Waller
 
| Constructor Summary | 
| SyncFsWriter(Configuration configuration)Creates a new instance of this class using the given configuration to initialize the class.
 | 
 
 
 
 
CONFIG_PATH
public static final String CONFIG_PATH
CONFIG_MAXENTRIESINFILE
public static final String CONFIG_MAXENTRIESINFILE
CONFIG_MAXLOGSIZE
public static final String CONFIG_MAXLOGSIZE
CONFIG_MAXLOGFILES
public static final String CONFIG_MAXLOGFILES
CONFIG_FLUSH
public static final String CONFIG_FLUSH
CONFIG_BUFFER
public static final String CONFIG_BUFFER
SyncFsWriter
public SyncFsWriter(Configuration configuration)
             throws IllegalArgumentException
- Creates a new instance of this class using the given configuration to initialize the class.
 
- Parameters:
- configuration- The configuration used to initialize this writer.
- Throws:
- IllegalArgumentException- If the given configuration is invalid.
 
newMonitoringRecord
public final boolean newMonitoringRecord(IMonitoringRecord monitoringRecord)
- Called for each new record.
 
 Notice, that this method should not throw an exception, but indicate an error by the return value false.
 
- 
- Parameters:
- monitoringRecord- the record.
- Returns:
- true on success; false in case of an error.
 
terminate
public final void terminate()
- Called by the Monitoring Controller to announce a shutdown of monitoring.
 Writers should return as soon as it is safe to terminate Kieker.
 
- 
 
toString
public final String toString()
- Description copied from interface: IMonitoringWriter
- Delivers a string representation of this writer.
 
- 
- Specified by:
- toStringin interface- IMonitoringWriter
- Overrides:
- toStringin class- AbstractMonitoringWriter
 
- 
- Returns:
- A string.
 
Copyright 2014 Kieker Project, http://kieker-monitoring.net>