Apama  10.15.0.2
com::softwareag::connectivity::StatusReporter::StatusItem Class Reference

A class that can be used to efficiently update the value associated with a single status key. More...

#include <sag_connectivity_plugins.hpp>

Public Member Functions

void setStatus (const std::string &value)
 Set a string status value. More...
 
void setStatus (int64_t value)
 Set an integer status value. More...
 
std::string getStatus ()
 Return the value this status item was set to most recently by this class. More...
 
void increment (int64_t incrementValue=1)
 Set an integer status value by incrementing the previous integer value that was set by this object. More...
 
const std::string & key ()
 Get the unique key specified when this status item was created. More...
 

Detailed Description

A class that can be used to efficiently update the value associated with a single status key.

This object is thread safe.

Only one StatusItem instance can exist for a given key. Ensure that no methods are called on this object after the plug-in has been shutdown.

Member Function Documentation

◆ getStatus()

std::string com::softwareag::connectivity::StatusReporter::StatusItem::getStatus ( )
inline

Return the value this status item was set to most recently by this class.

This method takes a lock and may be called from multiple threads.

Returns
The last value this was set to.

◆ increment()

void com::softwareag::connectivity::StatusReporter::StatusItem::increment ( int64_t  incrementValue = 1)
inline

Set an integer status value by incrementing the previous integer value that was set by this object.

This method takes a lock and may be called from multiple threads.

Parameters
incrementValuethe value to add on to the current value and set as the status. This can be a negative number. Default value is +1.

◆ key()

const std::string& com::softwareag::connectivity::StatusReporter::StatusItem::key ( )
inline

Get the unique key specified when this status item was created.

◆ setStatus() [1/2]

void com::softwareag::connectivity::StatusReporter::StatusItem::setStatus ( const std::string &  value)
inline

Set a string status value.

This method takes a lock and may be called from multiple threads.

Parameters
valuethe value to set e.g. STATUS_STARTING(), STATUS_ONLINE(), STATUS_FAILED().

◆ setStatus() [2/2]

void com::softwareag::connectivity::StatusReporter::StatusItem::setStatus ( int64_t  value)
inline

Set an integer status value.

This is a convenience method that converts an integer value into a string automatically.

This method takes a lock and may be called from multiple threads.

Parameters
valuethe value to set

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