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 java.util.Map<java.lang.String,java.util.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(java.util.Map<java.lang.String,java.lang.String> settings)voidpreCollect()Called before metrics collection startsvoidpreDestroy()voidsetDelegate(OutputWriter delegate)protected voidstoreQueryResult(QueryResult currentResult)voidwriteInvocationResult(java.lang.String invocationName, java.lang.Object value)voidwriteQueryResult(java.lang.String metricName, java.lang.String metricType, java.lang.Object value)Methods inherited from class org.jmxtrans.agent.AbstractOutputWriter
getDebugLevel, getInfoLevel, getTraceLevelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
delegate
-
previousQueryResultsByMetricName
protected java.util.Map<java.lang.String,java.util.Queue<QueryResult>> previousQueryResultsByMetricName
-
-
Constructor Details
-
PerMinuteSummarizerOutputWriter
public PerMinuteSummarizerOutputWriter() -
PerMinuteSummarizerOutputWriter
-
-
Method Details
-
writeInvocationResult
public void writeInvocationResult(@Nonnull java.lang.String invocationName, @Nullable java.lang.Object value) throws java.io.IOException- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
java.io.IOException
-
writeQueryResult
public void writeQueryResult(@Nonnull java.lang.String metricName, @Nullable java.lang.String metricType, @Nullable java.lang.Object value) throws java.io.IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritermetricType- seeQuery.type- Throws:
java.io.IOException
-
storeQueryResult
-
getPreviousQueryResult
-
perMinute
@Nonnull public QueryResult perMinute(@Nonnull QueryResult currentResult, @Nullable QueryResult previousResult) -
postConstruct
public void postConstruct(@Nonnull java.util.Map<java.lang.String,java.lang.String> settings)- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
preDestroy
public void preDestroy()- Specified by:
preDestroyin interfaceOutputWriter- Overrides:
preDestroyin classAbstractOutputWriter
-
postCollect
public void postCollect() throws java.io.IOExceptionDescription 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:
java.io.IOException
-
preCollect
public void preCollect() throws java.io.IOExceptionDescription copied from interface:OutputWriterCalled before metrics collection starts- Specified by:
preCollectin interfaceOutputWriter- Overrides:
preCollectin classAbstractOutputWriter- Throws:
java.io.IOException
-
setDelegate
-