Package org.jmxtrans.agent
Class PerMinuteSummarizerOutputWriter
java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.PerMinuteSummarizerOutputWriter
- All Implemented Interfaces:
OutputWriter
public class PerMinuteSummarizerOutputWriter extends AbstractOutputWriter implements OutputWriter
- Author:
- Cyrille Le Clerc
-
Field Summary
Fields Modifier and Type Field Description protected OutputWriterdelegateprotected Map<String,Queue<QueryResult>>previousQueryResultsByMetricNameFields inherited from class org.jmxtrans.agent.AbstractOutputWriter
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description PerMinuteSummarizerOutputWriter()PerMinuteSummarizerOutputWriter(OutputWriter delegate) -
Method Summary
Modifier and Type Method Description protected QueryResultgetPreviousQueryResult(QueryResult currentResult)QueryResultperMinute(QueryResult currentResult, QueryResult previousResult)voidpostCollect()called after a serie of writes, typically at the end of a collection.voidpostConstruct(Map<String,String> settings)voidpreCollect()Called before metrics collection startsvoidpreDestroy()voidsetDelegate(OutputWriter delegate)protected voidstoreQueryResult(QueryResult currentResult)voidwriteInvocationResult(String invocationName, Object value)voidwriteQueryResult(String metricName, String metricType, Object value)Methods inherited from class org.jmxtrans.agent.AbstractOutputWriter
getDebugLevel, getInfoLevel, getTraceLevel
-
Field Details
-
delegate
-
previousQueryResultsByMetricName
-
-
Constructor Details
-
PerMinuteSummarizerOutputWriter
public PerMinuteSummarizerOutputWriter() -
PerMinuteSummarizerOutputWriter
-
-
Method Details
-
writeInvocationResult
public void writeInvocationResult(@Nonnull String invocationName, @Nullable Object value) throws IOException- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
IOException
-
writeQueryResult
public void writeQueryResult(@Nonnull String metricName, @Nullable String metricType, @Nullable Object value) throws IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritermetricType- seeQuery.type- Throws:
IOException
-
storeQueryResult
-
getPreviousQueryResult
-
perMinute
@Nonnull public QueryResult perMinute(@Nonnull QueryResult currentResult, @Nullable QueryResult previousResult) -
postConstruct
- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
preDestroy
public void preDestroy()- Specified by:
preDestroyin interfaceOutputWriter- Overrides:
preDestroyin classAbstractOutputWriter
-
postCollect
Description copied from interface:OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
- Specified by:
postCollectin interfaceOutputWriter- Overrides:
postCollectin classAbstractOutputWriter- Throws:
IOException
-
preCollect
Description copied from interface:OutputWriterCalled before metrics collection starts- Specified by:
preCollectin interfaceOutputWriter- Overrides:
preCollectin classAbstractOutputWriter- Throws:
IOException
-
setDelegate
-