Apama
10.15.0.2
|
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... | |
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.
|
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.
|
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.
incrementValue | the value to add on to the current value and set as the status. This can be a negative number. Default value is +1. |
|
inline |
Get the unique key specified when this status item was created.
|
inline |
Set a string status value.
This method takes a lock and may be called from multiple threads.
value | the value to set e.g. STATUS_STARTING(), STATUS_ONLINE(), STATUS_FAILED(). |
|
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.
value | the value to set |