Package org.jmxtrans.agent
Class OutputWriterCircuitBreakerDecorator
java.lang.Object
org.jmxtrans.agent.OutputWriterCircuitBreakerDecorator
- All Implemented Interfaces:
OutputWriter
public class OutputWriterCircuitBreakerDecorator extends Object implements OutputWriter
- Author:
- Cyrille Le Clerc
-
Field Summary
Fields Modifier and Type Field Description protected OutputWriterdelegateprotected Loggerloggerstatic StringSETTING_ENABLED -
Constructor Summary
Constructors Constructor Description OutputWriterCircuitBreakerDecorator(OutputWriter delegate) -
Method Summary
Modifier and Type Method Description voidincrementOutputWriterFailures()voidincrementOutputWriterSuccess()booleanisDisabled()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()voidwriteInvocationResult(String invocationName, Object value)voidwriteQueryResult(String metricName, String metricType, Object value)
-
Field Details
-
SETTING_ENABLED
- See Also:
- Constant Field Values
-
logger
-
delegate
-
-
Constructor Details
-
OutputWriterCircuitBreakerDecorator
-
-
Method Details
-
postConstruct
- Specified by:
postConstructin interfaceOutputWriter
-
preDestroy
public void preDestroy()- Specified by:
preDestroyin interfaceOutputWriter
-
preCollect
Description copied from interface:OutputWriterCalled before metrics collection starts- Specified by:
preCollectin interfaceOutputWriter- Throws:
IOException
-
writeQueryResult
public void writeQueryResult(@Nonnull String metricName, @Nullable String metricType, @Nullable Object value) throws IOException- Specified by:
writeQueryResultin interfaceOutputWritermetricType- seeQuery.type- Throws:
IOException
-
writeInvocationResult
- Specified by:
writeInvocationResultin interfaceOutputWriter- Throws:
IOException
-
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- Throws:
IOException
-
isDisabled
public boolean isDisabled() -
incrementOutputWriterFailures
public void incrementOutputWriterFailures() -
incrementOutputWriterSuccess
public void incrementOutputWriterSuccess()
-