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