public interface ModelLogHandler
A sample implementation of this interface is show in FileLogHandler.java. This implementation logs every
record to a file as soon as the record is processed. This implementation also logs a counter for missing and invalid
values for a given field. The logging of missing and invalid values is done when flush()
is invoked.
Note: The implementor is responsible for invocation of flush()
and ensuring the thread safety of any state
which is maintained before flush()
is invoked.
This implementation needs to be in the classpath of ADAPA library along with any necessary dependencies and it can be integrated into ADAPA by using a Spring configuration file as described in applicationContext.xml.
Modifier and Type | Interface and Description |
---|---|
static interface |
ModelLogHandler.Factory
This interface provides a factory method for creating
ModelLogHandler instances. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the handler.
|
void |
flush()
Flush the handler.
|
void |
logInvalidValue(String fieldName,
Object value)
Log the value of a field as an invalid value.
|
void |
logMissingValue(String fieldName,
Object value)
Log the value of a field as a missing value.
|
void |
logRecord(Map<String,Object> record)
Log a full record, at the end of processing.
|
void logRecord(Map<String,Object> record)
record
- the record to log, provided as a key-value pairsvoid logMissingValue(String fieldName, Object value)
fieldName
- the name of the field with the missing valuevalue
- the value considered missing, typically null
void logInvalidValue(String fieldName, Object value)
fieldName
- the name of the field with the invalid valuevalue
- the invalid valuevoid flush()
void close()
Copyright © 2005–2016 Zementis, Inc.. All rights reserved.