Public Member Functions | List of all members
Aws::CloudWatchMetrics::MetricService Class Reference

#include <metric_service.hpp>

Inheritance diagram for Aws::CloudWatchMetrics::MetricService:
Inheritance graph
[legend]

Public Member Functions

MetricDatum convertInputToBatched (const Utils::MetricObject &input, const std::chrono::milliseconds &milliseconds) override
 
MetricDatum convertInputToBatched (const Utils::MetricObject &input) override
 
 MetricService (std::shared_ptr< Publisher< MetricDatumCollection >> publisher, std::shared_ptr< DataBatcher< MetricDatum >> batcher, std::shared_ptr< Aws::FileManagement::FileUploadStreamer< MetricDatumCollection >> file_upload_streamer=nullptr)
 
- Public Member Functions inherited from Aws::CloudWatch::CloudWatchService< Utils::MetricObject, MetricDatum >
virtual bool batchData (const D &data_to_batch)
 
virtual bool batchData (const D &data_to_batch, const std::chrono::milliseconds &milliseconds)
 
 CloudWatchService (std::shared_ptr< Publisher< std::list< T >>> publisher, std::shared_ptr< DataBatcher< T >> batcher)
 
virtual std::chrono::milliseconds getCurrentTimestamp ()
 
virtual std::chrono::milliseconds getDequeueDuration ()
 
int getNumberDequeued ()
 
virtual bool isConnected ()
 
virtual bool publishBatchedData ()
 
virtual bool setDequeueDuration (std::chrono::milliseconds new_value)
 
virtual bool shutdown ()
 
virtual bool start () override
 
 ~CloudWatchService ()=default
 
- Public Member Functions inherited from InputStage< TaskPtr< std::list< T > > >
std::shared_ptr< Source< TaskPtr< std::list< T > > > > getSource ()
 
void setSource (std::shared_ptr< Source< TaskPtr< std::list< T > > >> source)
 
- Public Member Functions inherited from RunnableService
std::string getStatusString () override
 
virtual bool isRunning ()
 
void join ()
 
 RunnableService ()
 
void waitForShutdown (std::chrono::milliseconds millis)
 
void waitForShutdown ()
 
 ~RunnableService () override=default
 
- Public Member Functions inherited from Service
ServiceState getState ()
 
 Service ()
 
virtual ~Service ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from Aws::CloudWatch::CloudWatchService< Utils::MetricObject, MetricDatum >
virtual T convertInputToBatched (const D &input, const std::chrono::milliseconds &milliseconds)=0
 
virtual T convertInputToBatched (const D &input)=0
 
void work ()
 
- Protected Member Functions inherited from RunnableService
virtual void run ()
 
virtual bool startWorkerThread ()
 
virtual bool stopWorkerThread ()
 
- Protected Member Functions inherited from Service
void setState (ServiceState new_state)
 
- Protected Attributes inherited from Aws::CloudWatch::CloudWatchService< Utils::MetricObject, MetricDatum >
std::shared_ptr< DataBatcher< T > > batcher_
 
std::chrono::milliseconds dequeue_duration_
 
std::shared_ptr< FileUploadStreamer< std::list< T > > > file_upload_streamer_
 
std::shared_ptr< Publisher< std::list< T > > > publisher_
 

Detailed Description

Implementation to send metrics to CloudWatch. Note: though the batcher and publisher are required, the file streamer is not. If the file streamer is not provided then metric data is dropped if any failure is observed during the attempt to publish.

Definition at line 46 of file metric_service.hpp.

Constructor & Destructor Documentation

Aws::CloudWatchMetrics::MetricService::MetricService ( std::shared_ptr< Publisher< MetricDatumCollection >>  publisher,
std::shared_ptr< DataBatcher< MetricDatum >>  batcher,
std::shared_ptr< Aws::FileManagement::FileUploadStreamer< MetricDatumCollection >>  file_upload_streamer = nullptr 
)
inline

Construct a new instance of MetricService.

Parameters
publisherused to publish metrics to CloudWatch
batcherused to batch / queue metrics before publishing
file_upload_streamerused to save metric data and upload later in the event of network connectivity changes

Definition at line 57 of file metric_service.hpp.

Member Function Documentation

MetricDatum Aws::CloudWatchMetrics::MetricService::convertInputToBatched ( const Utils::MetricObject input,
const std::chrono::milliseconds &  milliseconds 
)
inlineoverride

Convert an input MetricObject (provided but the user) to the specific AWS SDK type.

Parameters
inputMetricObject to convert
millisecondstimestamp to use for metric
Returns
MetricDatum to publish

Definition at line 73 of file metric_service.hpp.

MetricDatum Aws::CloudWatchMetrics::MetricService::convertInputToBatched ( const Utils::MetricObject input)
inlineoverride

Convert an input MetricObject (provided but the user) to the specific AWS SDK type.

Parameters
inputMetricObject to convert
Returns
MetricDatum to publish

Definition at line 86 of file metric_service.hpp.


The documentation for this class was generated from the following file:


cloudwatch_metrics_common
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:26