[#BloombergLP-balm-IntegerCollector]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::IntegerCollector
:relfileprefix: ../../
:mrdocs:

This class provides a mechanism for collecting and aggregating the value of an integer metric over a period of time&period;

== Synopsis

Declared in `&lt;balm&lowbar;integercollector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class IntegerCollector;
----

== Description

The collector contains a `MetricId` object identifying the metric being collected, the number of times an event occurred, and the total, minimum, and maximum aggregates of the associated measurement value&period; The default value for the count is 0, the default value for the total is 0, the default value for the minimum is `k&lowbar;DEFAULT&lowbar;MIN`, and the default value for the maximum is `k&lowbar;DEFAULT&lowbar;MAX`&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balm/IntegerCollector/2constructor.adoc[`IntegerCollector`]         [.small]#[constructor]#
| Create an integer collector for a metric having the specified `metricId`&period;
| xref:BloombergLP/balm/IntegerCollector/2destructor.adoc[`&#126;IntegerCollector`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/balm/IntegerCollector/accumulateCountTotalMinMax.adoc[`accumulateCountTotalMinMax`] 
| Accumulate the specified count, total, min, and max into this collector&period;
| xref:BloombergLP/balm/IntegerCollector/load.adoc[`load`] 
| Load the current metric aggregates into the specified `record`&period;
| xref:BloombergLP/balm/IntegerCollector/loadAndReset.adoc[`loadAndReset`] 
| Load the current metric aggregates into the specified `records` and reset this collector&period;
| xref:BloombergLP/balm/IntegerCollector/metricId.adoc[`metricId`] 
| Return a reference to the non&hyphen;modifiable `MetricId` object identifying the metric for which this object collects values&period;
| xref:BloombergLP/balm/IntegerCollector/reset.adoc[`reset`] 
| Reset the count, total, minimum, and maximum values of the metric being collected to their default states&period;
| xref:BloombergLP/balm/IntegerCollector/setCountTotalMinMax.adoc[`setCountTotalMinMax`] 
| Set the count, total, min, and max aggregates to the specified values&period;
| xref:BloombergLP/balm/IntegerCollector/update.adoc[`update`] 
| Update the collected aggregates with the specified `value`&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balm/IntegerCollector/DEFAULT_MAX.adoc[`DEFAULT&lowbar;MAX`] 
| Deprecated alias for `k&lowbar;DEFAULT&lowbar;MAX`&period;
| xref:BloombergLP/balm/IntegerCollector/DEFAULT_MIN.adoc[`DEFAULT&lowbar;MIN`] 
| Deprecated alias for `k&lowbar;DEFAULT&lowbar;MIN`&period;
| xref:BloombergLP/balm/IntegerCollector/k_DEFAULT_MAX.adoc[`k&lowbar;DEFAULT&lowbar;MAX`] 
| Default maximum value (`INT&lowbar;MIN`)&period;
| xref:BloombergLP/balm/IntegerCollector/k_DEFAULT_MIN.adoc[`k&lowbar;DEFAULT&lowbar;MIN`] 
| Default minimum value (`INT&lowbar;MAX`)&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
