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

Set the enabled state of all categories to `value`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setAllCategoriesEnabled(bool value);
----

== Description

Set whether each currently registered category is enabled to the specified `value`, and ensure that categories registered after this call are initialized as either enabled or disabled, accordingly&period; This operation is logically equivalent to iterating over the list of currently registered categories and calling `setCategoryEnabled` on each category individually, and also setting a default `enabled` value (for newly&hyphen;created categories)&period; Hence, subsequent calls `setCategoryEnabled` will override this value for a particular category&period; Note that this operation is thread&hyphen;safe, but _not_ atomic&colon; Other threads may simultaneously access the current enabled status for registered categories while this operation completes&period; Also note that this operation has _linear_ runtime performance with respect to the total number of category holders registered with this repository&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| new enabled state for all categories
|===


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