public class PerMinuteSummarizerOutputWriter extends AbstractOutputWriter implements OutputWriter
| Modifier and Type | Field and Description |
|---|---|
protected OutputWriter |
delegate |
protected Map<String,Queue<QueryResult>> |
previousQueryResultsByMetricName |
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE| Constructor and Description |
|---|
PerMinuteSummarizerOutputWriter() |
PerMinuteSummarizerOutputWriter(OutputWriter delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected QueryResult |
getPreviousQueryResult(QueryResult currentResult) |
QueryResult |
perMinute(QueryResult currentResult,
QueryResult previousResult) |
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() |
void |
setDelegate(OutputWriter delegate) |
protected void |
storeQueryResult(QueryResult currentResult) |
void |
writeInvocationResult(String invocationName,
Object value) |
void |
writeQueryResult(String metricName,
String metricType,
Object value) |
getDebugLevel, getInfoLevel, getTraceLevelprotected OutputWriter delegate
protected Map<String,Queue<QueryResult>> previousQueryResultsByMetricName
public PerMinuteSummarizerOutputWriter()
public PerMinuteSummarizerOutputWriter(OutputWriter delegate)
public void writeInvocationResult(@Nonnull String invocationName, @Nullable Object value) throws IOException
writeInvocationResult in interface OutputWriterwriteInvocationResult in class AbstractOutputWriterIOExceptionpublic void writeQueryResult(@Nonnull String metricName, @Nullable String metricType, @Nullable Object value) throws IOException
writeQueryResult in interface OutputWriterwriteQueryResult in class AbstractOutputWritermetricType - see Query.typeIOExceptionprotected void storeQueryResult(@Nullable QueryResult currentResult)
@Nullable protected QueryResult getPreviousQueryResult(@Nonnull QueryResult currentResult)
@Nonnull public QueryResult perMinute(@Nonnull QueryResult currentResult, @Nullable QueryResult previousResult)
public void postConstruct(@Nonnull Map<String,String> settings)
postConstruct in interface OutputWriterpostConstruct in class AbstractOutputWriterpublic void preDestroy()
preDestroy in interface OutputWriterpreDestroy in class AbstractOutputWriterpublic void postCollect()
throws IOException
OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
postCollect in interface OutputWriterpostCollect in class AbstractOutputWriterIOExceptionpublic void preCollect()
throws IOException
OutputWriterpreCollect in interface OutputWriterpreCollect in class AbstractOutputWriterIOExceptionpublic void setDelegate(OutputWriter delegate)
Copyright © 2015. All Rights Reserved.