public abstract class AbstractOutputWriter extends Object implements OutputWriter
| Modifier and Type | Field and Description |
|---|---|
protected Logger |
logger |
static String |
SETTING_LOG_LEVEL
Define the level of log message to display tweaking java.util.logging configuration.
|
static String |
SETTING_LOG_LEVEL_DEFAULT_VALUE |
| Constructor and Description |
|---|
AbstractOutputWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected Level |
getDebugLevel()
To workaround the complex configuration of java.util.logging, we tweak the level for "debug style" messages
using the "logLevel" initialization parameter.
|
protected Level |
getInfoLevel()
To workaround the complex configuration of java.util.logging, we tweak the level for "info style" messages
using the "logLevel" initialization parameter.
|
protected Level |
getTraceLevel()
To workaround the complex configuration of java.util.logging, we tweak the level for "trace style" messages
using the "logLevel" initialization parameter.
|
void |
postCollect()
called after a serie of writes, typically at the end of a collection.
|
void |
postConstruct(Map<String,String> settings) |
void |
preCollect()
Called before metrics collection starts
|
void |
preDestroy() |
abstract void |
writeInvocationResult(String invocationName,
Object value) |
abstract void |
writeQueryResult(String metricName,
String metricType,
Object value) |
public static final String SETTING_LOG_LEVEL
INFOpublic static final String SETTING_LOG_LEVEL_DEFAULT_VALUE
protected final Logger logger
public void postConstruct(@Nonnull Map<String,String> settings)
postConstruct in interface OutputWriterpublic void preDestroy()
preDestroy in interface OutputWriterpublic void postCollect()
throws IOException
OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
postCollect in interface OutputWriterIOExceptionpublic void preCollect()
throws IOException
OutputWriterpreCollect in interface OutputWriterIOExceptionpublic abstract void writeInvocationResult(@Nonnull String invocationName, @Nullable Object value) throws IOException
writeInvocationResult in interface OutputWriterIOExceptionpublic abstract void writeQueryResult(@Nonnull String metricName, @Nullable String metricType, @Nullable Object value) throws IOException
writeQueryResult in interface OutputWritermetricType - see Query.typeIOException@Nonnull protected Level getDebugLevel()
@Nonnull protected Level getTraceLevel()
@Nonnull protected Level getInfoLevel()
Copyright © 2017. All Rights Reserved.