Class CeilometerMetricStreamer
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.ceilometer.CeilometerMetricStreamer
-
- All Implemented Interfaces:
com.elastisys.autoscaler.core.api.Configurable<CeilometerMetricStreamerConfig>,com.elastisys.autoscaler.core.api.Service<CeilometerMetricStreamerConfig>,com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamer<CeilometerMetricStreamerConfig>
public class CeilometerMetricStreamer extends java.lang.Object implements com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamer<CeilometerMetricStreamerConfig>
MetricStreamerthat operates against OpenStack Ceilometer.
-
-
Constructor Summary
Constructors Constructor Description CeilometerMetricStreamer(org.slf4j.Logger logger, java.util.concurrent.ScheduledExecutorService executor, com.elastisys.scale.commons.eventbus.EventBus eventBus)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(CeilometerMetricStreamerConfig configuration)voidfetch()CeilometerMetricStreamerConfiggetConfiguration()java.lang.Class<CeilometerMetricStreamerConfig>getConfigurationClass()com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamgetMetricStream(java.lang.String metricStreamId)java.util.List<com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream>getMetricStreams()com.elastisys.autoscaler.core.api.types.ServiceStatusgetStatus()voidstart()voidstop()voidvalidate(CeilometerMetricStreamerConfig configuration)
-
-
-
Constructor Detail
-
CeilometerMetricStreamer
@Inject public CeilometerMetricStreamer(org.slf4j.Logger logger, java.util.concurrent.ScheduledExecutorService executor, com.elastisys.scale.commons.eventbus.EventBus eventBus)Creates a new instance. The new instance will be in an unconfigured and stopped state.- Parameters:
logger-Loggerto use.executor- Task execution service for performing work in separate threads.eventBus- TheEventBuson which to send out collectedMetricValues.
-
-
Method Detail
-
validate
public void validate(CeilometerMetricStreamerConfig configuration) throws java.lang.IllegalArgumentException
- Specified by:
validatein interfacecom.elastisys.autoscaler.core.api.Configurable<CeilometerMetricStreamerConfig>- Throws:
java.lang.IllegalArgumentException
-
configure
public void configure(CeilometerMetricStreamerConfig configuration) throws java.lang.IllegalArgumentException
- Specified by:
configurein interfacecom.elastisys.autoscaler.core.api.Configurable<CeilometerMetricStreamerConfig>- Throws:
java.lang.IllegalArgumentException
-
getConfiguration
public CeilometerMetricStreamerConfig getConfiguration()
- Specified by:
getConfigurationin interfacecom.elastisys.autoscaler.core.api.Configurable<CeilometerMetricStreamerConfig>
-
start
public void start() throws java.lang.IllegalStateException- Specified by:
startin interfacecom.elastisys.autoscaler.core.api.Service<CeilometerMetricStreamerConfig>- Throws:
java.lang.IllegalStateException
-
stop
public void stop()
- Specified by:
stopin interfacecom.elastisys.autoscaler.core.api.Service<CeilometerMetricStreamerConfig>
-
getStatus
public com.elastisys.autoscaler.core.api.types.ServiceStatus getStatus()
- Specified by:
getStatusin interfacecom.elastisys.autoscaler.core.api.Service<CeilometerMetricStreamerConfig>
-
getConfigurationClass
public java.lang.Class<CeilometerMetricStreamerConfig> getConfigurationClass()
- Specified by:
getConfigurationClassin interfacecom.elastisys.autoscaler.core.api.Configurable<CeilometerMetricStreamerConfig>
-
getMetricStreams
public java.util.List<com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream> getMetricStreams()
- Specified by:
getMetricStreamsin interfacecom.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamer<CeilometerMetricStreamerConfig>
-
getMetricStream
public com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream getMetricStream(java.lang.String metricStreamId) throws java.lang.IllegalArgumentException- Specified by:
getMetricStreamin interfacecom.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamer<CeilometerMetricStreamerConfig>- Throws:
java.lang.IllegalArgumentException
-
fetch
public void fetch() throws com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamException, java.lang.IllegalStateException- Specified by:
fetchin interfacecom.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamer<CeilometerMetricStreamerConfig>- Throws:
com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStreamExceptionjava.lang.IllegalStateException
-
-