[#BloombergLP-balm-MetricsManager-setCategoryEnabled-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricsManager.adoc[MetricsManager]::setCategoryEnabled :relfileprefix: ../../../ :mrdocs: `setCategoryEnabled` overloads == Synopses Declared in `<balm_metricsmanager.h>` Set whether the specified `category` is enabled to the optionally specified `value`. If a category is disabled it will not be published (see the `publish` methods), and higher level components may not record values for metrics belonging to the category (for an example, see the `balm_metric` documentation). The behavior is undefined unless `category` is a valid address of a category previously returned by the metric registry owned by this `MetricManager` object (i.e., `metricRegistry()`). Note that this operation is thread‐safe, but _not_ atomic: Other threads may simultaneously access the current enabled value for `category` while this operation is performed. Also note that this operation has _linear_ performance with respect to the number of registered category holders for `category` (see `balm_metricregistry` and `balm_category` for information on category holders). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balm/MetricsManager/setCategoryEnabled-08.adoc[setCategoryEnabled]( xref:BloombergLP/balm/Category.adoc[Category] const* category, bool value = true); ---- [.small]#xref:BloombergLP/balm/MetricsManager/setCategoryEnabled-08.adoc[_» more..._]# Set whether the specified `category` is enabled to the optionally specified `isEnabled` value. If `category` has not been registered, register it with the `metricRegistry()`. If a category is disabled it will not be published (see the `publish` methods), and higher level components may not record values for metrics belonging to the category (for an example, see the `balm_metric` documentation). Note that this operation is _not_ atomic, and other threads may simultaneously access the current enabled value for `category` while this operation is performed. Also note that this operation has _linear_ performance with respect to the number of registered category holders for `category` (see `balm_metricregistry` and `balm_category` for information on category holders). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balm/MetricsManager/setCategoryEnabled-0a.adoc[setCategoryEnabled]( char const* category, bool isEnabled = true); ---- [.small]#xref:BloombergLP/balm/MetricsManager/setCategoryEnabled-0a.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#