arm4::ArmMetricDefinition Class Reference
[ARM 4.0 Metrics]
The base class for all the metric definition interfaces. More...
Public Member Functions | |
const ArmID & | getID () const |
Gets the (optional) ID for this definition. | |
const std::string & | getName () const |
Gets the name of this definition. | |
const std::string & | getUnits () const |
Gets the (optional) units description. | |
int16_t | getUsage () const |
Gets the usage semantics. | |
Static Public Attributes | |
static const int16_t | METRIC_USE_GENERAL = 0 |
static const int16_t | METRIC_USE_TRAN_SIZE = 1 |
static const int16_t | METRIC_USE_TRAN_STATUS = 2 |
static const int16_t | EXT_METRIC_USE_TRAN_CONCURRENCY = -3 |
Detailed Description
The base class for all the metric definition interfaces.
All the methods are defined in ArmMetricDefinition
. The subclasses serve as markers for the data types. All the publicly accessible attributes are immutable and have a getter method for them.
The attributes are:
- The definition of the application that contains the transaction.
-
Name. The maximum length is 127 characters. The name must not be a
NullString
or zero-length. -
Units. An optional string describing the units of measurement, such as "files" or "jobs in queue". It may be a
NullString
. -
Usage. Describes any additional information about the semantics of the metric. Most metrics will be classified as "general", indicating that there is no specific semantic declared. The two specific semantics are the size of the transaction, such as the number of files that were backed up, and a status that could contain data, such as an error code that describes why a transaction failed. See the field descriptions of
METRIC_USE_...
below for the defined values. Any negative value is also permitted; the negative range is reserved for application-specific values. - Optional ID. An optional 16-byte ID may be associated with the identity of a metric definition. The returned value, which could be ArmID::Null, is the same value passed to the constructor. The ID value is bound to a unique combination of the metric format (e.g., Counter32), name, usage, and unit properties. When provided, the ID may be used as a concise alias for the unique combination. It may be a ArmID::Null.
This class cannot be instantiated.
Member Function Documentation
const ArmID& arm4::ArmMetricDefinition::getID | ( | ) | const |
Gets the (optional) ID for this definition.
- Returns:
- the ID or
ArmID::Null
.
const std::string& arm4::ArmMetricDefinition::getName | ( | ) | const |
Gets the name of this definition.
- Returns:
- the definition name.
const std::string& arm4::ArmMetricDefinition::getUnits | ( | ) | const |
Gets the (optional) units description.
- Returns:
- the units desciption or
null
.
int16_t arm4::ArmMetricDefinition::getUsage | ( | ) | const |
Gets the usage semantics.
- Returns:
- One of METRIC_USE_GENERAL, METRIC_USE_TRAN_SIZE, METRIC_USE_TRAN_STATUS, or an application-specific negative value.
Member Data Documentation
const int16_t arm4::ArmMetricDefinition::EXT_METRIC_USE_TRAN_CONCURRENCY = -3 [static] |
Metric explains the concurrent usage of a transaction. (gauge only)
const int16_t arm4::ArmMetricDefinition::METRIC_USE_GENERAL = 0 [static] |
No specific usage semantics are declared.
const int16_t arm4::ArmMetricDefinition::METRIC_USE_TRAN_SIZE = 1 [static] |
Metric represents the "size" of the transaction (counter & gauge only).
const int16_t arm4::ArmMetricDefinition::METRIC_USE_TRAN_STATUS = 2 [static] |
Metric represents status, like an error code (numeric ID & string only).
The documentation for this class was generated from the following file:
- Arm4/ArmMetricDefinition