Class CeilometerMetricStreamerConfig
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.ceilometer.config.CeilometerMetricStreamerConfig
-
public class CeilometerMetricStreamerConfig extends java.lang.ObjectCarries configuration parameters for theCeilometerMetricStreamer.- See Also:
CeilometerMetricStreamer
-
-
Constructor Summary
Constructors Constructor Description CeilometerMetricStreamerConfig(com.elastisys.scale.commons.openstack.AuthConfig auth, java.lang.String region, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<CeilometerMetricStreamDefinition> metricStreams)Creates a newCeilometerMetricStreamerConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)com.elastisys.scale.commons.openstack.AuthConfiggetAuth()Declares how to authenticate with the OpenStack identity service (Keystone).java.util.List<CeilometerMetricStreamDefinition>getMetricStreams()The collection of publishedMetricStreams.com.elastisys.scale.commons.json.types.TimeIntervalgetPollInterval()Returns the polling interval (given in seconds) for metric streams.java.lang.StringgetRegion()The particular OpenStack region (out of the ones available in Keystone's service catalog) to connect to.inthashCode()java.lang.StringtoString()voidvalidate()Validates the configuration.CeilometerMetricStreamerConfigwithMetricStream(CeilometerMetricStreamDefinition stream)Returns a copy of thisCeilometerMetricStreamerConfigwith an additionalCeilometerMetricStreamDefinition.
-
-
-
Constructor Detail
-
CeilometerMetricStreamerConfig
public CeilometerMetricStreamerConfig(com.elastisys.scale.commons.openstack.AuthConfig auth, java.lang.String region, com.elastisys.scale.commons.json.types.TimeInterval pollInterval, java.util.List<CeilometerMetricStreamDefinition> metricStreams)Creates a newCeilometerMetricStreamerConfig.- Parameters:
auth- The authentication block, either in version 2 or version 3 format. Required.region- The particular OpenStack region (out of the ones available in Keystone's service catalog) to connect to. For example,RegionOne. Required.pollInterval- The polling interval for metric streams.metricStreams- The collection of publishedMetricStreams. May benull.
-
-
Method Detail
-
getAuth
public com.elastisys.scale.commons.openstack.AuthConfig getAuth()
Declares how to authenticate with the OpenStack identity service (Keystone).- Returns:
-
getRegion
public java.lang.String getRegion()
The particular OpenStack region (out of the ones available in Keystone's service catalog) to connect to. For example,RegionOne.- Returns:
-
getPollInterval
public com.elastisys.scale.commons.json.types.TimeInterval getPollInterval()
Returns the polling interval (given in seconds) for metric streams.- Returns:
-
getMetricStreams
public java.util.List<CeilometerMetricStreamDefinition> getMetricStreams()
The collection of publishedMetricStreams.- Returns:
-
validate
public void validate() throws java.lang.IllegalArgumentExceptionValidates the configuration. On validation error, anIllegalArgumentExceptionis thrown.- 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
-
withMetricStream
public CeilometerMetricStreamerConfig withMetricStream(CeilometerMetricStreamDefinition stream)
Returns a copy of thisCeilometerMetricStreamerConfigwith an additionalCeilometerMetricStreamDefinition. Note that the instance that this method is invoked on remains unchanged.- Parameters:
stream- TheCeilometerMetricStreamDefinitionthat will be added in the returned copy.- Returns:
- A copy of this
CeilometerMetricStreamerConfigwith the stream definition added.
-
-