public class GraphitePlainTextTcpOutputWriter extends AbstractOutputWriter implements OutputWriter
| Modifier and Type | Field and Description |
|---|---|
protected HostAndPort |
graphiteServerHostAndPort |
protected String |
metricPathPrefix |
static String |
SETTING_HOST |
static String |
SETTING_NAME_PREFIX |
static String |
SETTING_PORT |
static int |
SETTING_PORT_DEFAULT_VALUE |
static String |
SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS |
static int |
SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS_DEFAULT_VALUE |
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE| Constructor and Description |
|---|
GraphitePlainTextTcpOutputWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildMetricPathPrefix()
InetAddress.getLocalHost() may not be known at JVM startup when the process is launched as a Linux service. |
void |
postCollect()
called after a serie of writes, typically at the end of a collection.
|
void |
postConstruct(Map<String,String> settings) |
String |
toString() |
void |
writeInvocationResult(String invocationName,
Object value) |
void |
writeQueryResult(String metricName,
String type,
Object value) |
getDebugLevel, getInfoLevel, getTraceLevel, preCollect, preDestroyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpreCollect, preDestroypublic static final String SETTING_HOST
public static final String SETTING_PORT
public static final int SETTING_PORT_DEFAULT_VALUE
public static final String SETTING_NAME_PREFIX
public static final String SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS
public static final int SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS_DEFAULT_VALUE
protected String metricPathPrefix
protected HostAndPort graphiteServerHostAndPort
public void postConstruct(Map<String,String> settings)
postConstruct in interface OutputWriterpostConstruct in class AbstractOutputWriterprotected String buildMetricPathPrefix()
InetAddress.getLocalHost() may not be known at JVM startup when the process is launched as a Linux service.public void writeInvocationResult(@Nonnull String invocationName, @Nullable Object value) throws IOException
writeInvocationResult in interface OutputWriterwriteInvocationResult in class AbstractOutputWriterIOExceptionpublic void writeQueryResult(@Nonnull String metricName, @Nullable String type, @Nullable Object value) throws IOException
writeQueryResult in interface OutputWriterwriteQueryResult in class AbstractOutputWritertype - see Query.typeIOExceptionpublic void postCollect()
throws IOException
OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
postCollect in interface OutputWriterpostCollect in class AbstractOutputWriterIOExceptionCopyright © 2015. All Rights Reserved.