public class OutputWriterCircuitBreakerDecorator extends java.lang.Object implements OutputWriter
| Modifier and Type | Field and Description |
|---|---|
protected OutputWriter |
delegate |
protected Logger |
logger |
static java.lang.String |
SETTING_ENABLED |
| Constructor and Description |
|---|
OutputWriterCircuitBreakerDecorator(OutputWriter delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
incrementOutputWriterFailures() |
void |
incrementOutputWriterSuccess() |
boolean |
isDisabled() |
void |
postCollect()
called after a serie of writes, typically at the end of a collection.
|
void |
postConstruct(java.util.Map<java.lang.String,java.lang.String> settings) |
void |
preCollect()
Called before metrics collection starts
|
void |
preDestroy() |
void |
writeInvocationResult(java.lang.String invocationName,
java.lang.Object value) |
void |
writeQueryResult(java.lang.String metricName,
java.lang.String metricType,
java.lang.Object value) |
public static final java.lang.String SETTING_ENABLED
protected final Logger logger
protected final OutputWriter delegate
public OutputWriterCircuitBreakerDecorator(OutputWriter delegate)
public void postConstruct(java.util.Map<java.lang.String,java.lang.String> settings)
postConstruct in interface OutputWriterpublic void preDestroy()
preDestroy in interface OutputWriterpublic void preCollect()
throws java.io.IOException
OutputWriterpreCollect in interface OutputWriterjava.io.IOExceptionpublic void writeQueryResult(@Nonnull
java.lang.String metricName,
@Nullable
java.lang.String metricType,
@Nullable
java.lang.Object value)
throws java.io.IOException
writeQueryResult in interface OutputWritermetricType - see Query.typejava.io.IOExceptionpublic void writeInvocationResult(java.lang.String invocationName,
java.lang.Object value)
throws java.io.IOException
writeInvocationResult in interface OutputWriterjava.io.IOExceptionpublic void postCollect()
throws java.io.IOException
OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
postCollect in interface OutputWriterjava.io.IOExceptionpublic boolean isDisabled()
public void incrementOutputWriterFailures()
public void incrementOutputWriterSuccess()
Copyright © 2018. All Rights Reserved.