setValue Member Function
Sets the value of a Meter object counter to the specified amount. The current value can be obtained by calling getValue.
Syntax
void setValue(__int64
value);Parameters
- value
- [in] Required 64-bit int, which specifies the value to assign to the Meter object counter. A value of type int or long can also be specified.
Example
Listener *listener = new Listener("sampleApp", "4.0", NULL, false);
Meter *cacheSize = listener->lookupMeter("cache size");
- or -
Container *store = listener->lookupContainer("storeName");
Meter *cacheSize = store->lookupMeter("cache size");
cacheSize->setValue(1);
...