Class OpenTsdbMetricStreamerConfig
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.opentsdb.config.OpenTsdbMetricStreamerConfig
-
public class OpenTsdbMetricStreamerConfig extends java.lang.ObjectCarries configuration parameters for theOpenTsdbMetricStreamer.- See Also:
OpenTsdbMetricStreamer
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_OPENTSDB_PORTDefault foropenTsdbPort.static com.elastisys.scale.commons.json.types.TimeIntervalDEFAULT_POLL_INTERVALDefaultMetricStreampolling interval.
-
Constructor Summary
Constructors Constructor Description OpenTsdbMetricStreamerConfig(java.lang.String openTsdbHost, java.lang.Integer openTsdbPort, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<OpenTsdbMetricStreamDefinition> metricStreams)Creates a newOpenTsdbMetricStreamerConfigwith the specified configuration values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.List<OpenTsdbMetricStreamDefinition>getMetricStreams()The collection of publishedMetricStreams.java.lang.StringgetOpenTsdbHost()Returns the host name or IP address of the OpenTSDB server to use.intgetOpenTsdbPort()Returns the IP port number of the OpenTSDB server to use.com.elastisys.scale.commons.json.types.TimeIntervalgetPollInterval()Returns the polling interval for metric streams.inthashCode()java.lang.StringtoString()voidvalidate()Validates the configuration (checks if there are any obvious errors).OpenTsdbMetricStreamerConfigwithMetricStream(OpenTsdbMetricStreamDefinition streamDefinition)Returns a copy of thisOpenTsdbMetricStreamerConfigwith an additionalOpenTsdbMetricStreamDefinition.
-
-
-
Field Detail
-
DEFAULT_POLL_INTERVAL
public static final com.elastisys.scale.commons.json.types.TimeInterval DEFAULT_POLL_INTERVAL
DefaultMetricStreampolling interval.
-
DEFAULT_OPENTSDB_PORT
public static final int DEFAULT_OPENTSDB_PORT
Default foropenTsdbPort.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OpenTsdbMetricStreamerConfig
public OpenTsdbMetricStreamerConfig(java.lang.String openTsdbHost, java.lang.Integer openTsdbPort, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<OpenTsdbMetricStreamDefinition> metricStreams)Creates a newOpenTsdbMetricStreamerConfigwith the specified configuration values.- Parameters:
openTsdbHost- The host name or IP address of the OpenTSDB server to use.openTsdbPort- The IP port number of the OpenTSDB server to use. May benull. Default:DEFAULT_OPENTSDB_PORT.pollInterval- The polling interval for metric streams. May benull. Default is .metricStreams- The collection of publishedMetricStreams. May benull.
-
-
Method Detail
-
getOpenTsdbHost
public java.lang.String getOpenTsdbHost()
Returns the host name or IP address of the OpenTSDB server to use.- Returns:
-
getOpenTsdbPort
public int getOpenTsdbPort()
Returns the IP port number of the OpenTSDB server to use.- Returns:
-
getPollInterval
public com.elastisys.scale.commons.json.types.TimeInterval getPollInterval()
Returns the polling interval for metric streams.- Returns:
-
getMetricStreams
public java.util.List<OpenTsdbMetricStreamDefinition> getMetricStreams()
The collection of publishedMetricStreams.- Returns:
-
withMetricStream
public OpenTsdbMetricStreamerConfig withMetricStream(OpenTsdbMetricStreamDefinition streamDefinition)
Returns a copy of thisOpenTsdbMetricStreamerConfigwith an additionalOpenTsdbMetricStreamDefinition. Note that the instance that this method is invoked on remains unchanged.- Parameters:
streamDefinition- TheOpenTsdbMetricStreamDefinitionthat will be added in the returned copy.- Returns:
- A copy of this
OpenTsdbMetricStreamerConfigwith the stream definition added.
-
validate
public void validate() throws java.lang.IllegalArgumentExceptionValidates the configuration (checks if there are any obvious errors).- Throws:
java.lang.IllegalArgumentException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-