A class that can be used to efficiently update the value associated with a single status key.
More...
#include <sag_connectivity_plugins.hpp>
|
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 NOT thread-safe, so please use additional locking if it is necessary to update values from multiple threads.
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.
std::string com::softwareag::connectivity::StatusReporter::StatusItem::getStatus |
( |
| ) |
|
|
inline |
Return the value this status item was set to most recently by this class.
- Returns
- The last value this was set to.
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
-
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. |
const std::string& com::softwareag::connectivity::StatusReporter::StatusItem::key |
( |
| ) |
|
|
inline |
Get the unique key specified when this status item was created.
void com::softwareag::connectivity::StatusReporter::StatusItem::setStatus |
( |
const std::string & |
value | ) |
|
|
inline |
Set a string status value.
- Parameters
-
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
-
The documentation for this class was generated from the following file: