Package org.jmxtrans.agent
Class OutputWriterCircuitBreakerDecorator
java.lang.Object
org.jmxtrans.agent.OutputWriterCircuitBreakerDecorator
- All Implemented Interfaces:
OutputWriter
public class OutputWriterCircuitBreakerDecorator extends java.lang.Object implements OutputWriter
- Author:
- Cyrille Le Clerc
-
Field Summary
Fields Modifier and Type Field Description protected OutputWriterdelegateprotected Loggerloggerstatic java.lang.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(java.util.Map<java.lang.String,java.lang.String> settings)voidpreCollect()Called before metrics collection startsvoidpreDestroy()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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
SETTING_ENABLED
public static final java.lang.String SETTING_ENABLED- See Also:
- Constant Field Values
-
logger
-
delegate
-
-
Constructor Details
-
OutputWriterCircuitBreakerDecorator
-
-
Method Details
-
postConstruct
public void postConstruct(java.util.Map<java.lang.String,java.lang.String> settings)- Specified by:
postConstructin interfaceOutputWriter
-
preDestroy
public void preDestroy()- Specified by:
preDestroyin interfaceOutputWriter
-
preCollect
public void preCollect() throws java.io.IOExceptionDescription copied from interface:OutputWriterCalled before metrics collection starts- Specified by:
preCollectin interfaceOutputWriter- 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 interfaceOutputWritermetricType- seeQuery.type- Throws:
java.io.IOException
-
writeInvocationResult
public void writeInvocationResult(java.lang.String invocationName, java.lang.Object value) throws java.io.IOException- Specified by:
writeInvocationResultin interfaceOutputWriter- Throws:
java.io.IOException
-
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- Throws:
java.io.IOException
-
isDisabled
public boolean isDisabled() -
incrementOutputWriterFailures
public void incrementOutputWriterFailures() -
incrementOutputWriterSuccess
public void incrementOutputWriterSuccess()
-