Class FileWriter
java.lang.Object
kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.filesystem.FileWriter
- All Implemented Interfaces:
IRegistryListener<String>
Generic file writer which can be used to write any type of serialization.
Presently, two serialization methods exist.
- Since:
- 1.14
- Author:
- Reiner Jung
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the configuration key for the buffer size.static final StringThe name of the configuration for the charset name used to store strings (e.g.static final StringThe name of the configuration key to select a compression for the record log files.static final StringThe name of the configuration key determining to always flush the output file stream after writing each record.static final StringThe name of the configuration to define the handler of the file pool.static final StringThe name of the configuration to define the handler of the log stream.static final StringThe name of the configuration to switch for the map file handler; default TextMapFileHandler.static final StringThe name of the configuration determining the maximal number of entries in a file.static final StringThe name of the configuration determining the maximal number of log files.static final StringThe name of the configuration determining the maximal size of the files in MiB.static final StringThe name of the configuration for the custom storage path if the writer is advised not to store in the temporary directory.static final StringFields inherited from class kieker.monitoring.writer.AbstractMonitoringWriter
configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonNewRegistryEntry(String value, int id) This event is fired after a new registry entry was registered.voidThis event fires when Kieker has been initialized and is ready to monitor.voidThis event fires when Kieker has been notified to terminate.toString()Returns a textual representation of the writer's configuration.voidThis event fires when Kieker has received a new record.
-
Field Details
-
PREFIX
-
CONFIG_PATH
The name of the configuration for the custom storage path if the writer is advised not to store in the temporary directory. -
CONFIG_CHARSET_NAME
The name of the configuration for the charset name used to store strings (e.g. "UTF-8"). -
CONFIG_MAXENTRIESINFILE
The name of the configuration determining the maximal number of entries in a file. -
CONFIG_MAXLOGSIZE
The name of the configuration determining the maximal size of the files in MiB. -
CONFIG_MAXLOGFILES
The name of the configuration determining the maximal number of log files. -
CONFIG_MAP_FILE_HANDLER
The name of the configuration to switch for the map file handler; default TextMapFileHandler. -
CONFIG_LOG_POOL_FILE_HANDLER
The name of the configuration to define the handler of the file pool. -
CONFIG_LOG_STREAM_HANDLER
The name of the configuration to define the handler of the log stream. -
CONFIG_FLUSH
The name of the configuration key determining to always flush the output file stream after writing each record. -
CONFIG_COMPRESSION_FILTER
The name of the configuration key to select a compression for the record log files. -
CONFIG_BUFFERSIZE
The name of the configuration key for the buffer size.
-
-
Constructor Details
-
FileWriter
Create a generic file writer.- Parameters:
configuration- Kieker configuration object.- Throws:
IOException
-
-
Method Details
-
onNewRegistryEntry
Description copied from interface:IRegistryListenerThis event is fired after a new registry entry was registered.- Specified by:
onNewRegistryEntryin interfaceIRegistryListener<String>- Parameters:
value- valueid- id
-
onStarting
public void onStarting()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been initialized and is ready to monitor. It is executed by theMonitoringWriterThreadjust before reading the writer queue.- Specified by:
onStartingin classAbstractMonitoringWriter
-
writeMonitoringRecord
Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has received a new record.- Specified by:
writeMonitoringRecordin classAbstractMonitoringWriter
-
onTerminating
public void onTerminating()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been notified to terminate. It is executed by theMonitoringWriterThreadjust after finishing the writer queue.- Specified by:
onTerminatingin classAbstractMonitoringWriter
-
toString
Returns a textual representation of the writer's configuration.- Overrides:
toStringin classAbstractMonitoringWriter- Returns:
- a textual representation of the writer's configuration
-