[#BloombergLP-ball-CategoryManager-setThresholdLevelsHierarchically]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager.adoc[CategoryManager]::setThresholdLevelsHierarchically
:relfileprefix: ../../../
:mrdocs:

Set the threshold levels of all existing and future categories whose name starts with the specified `categoryNamePrefix` unless it is empty, possibly changed by the registered category name filter callback, to the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` if those levels form valid settings and return the number of categories updated (zero or a positive number)&period; In case `categoryNamePrefix` is empty update all categories with the threshold levels and delete all stored orphan hierarchical settings&period; In other words an empty category setting will never overwrite the defaults for future hierarchical categories&period; The behavior is undefined unless a lock is not held by this thread on the mutex returned by `rulesetMutex`&period; If any of the specified threshold levels is invalid, return a negative value&period;

== Synopsis

Declared in `&lt;ball&lowbar;categorymanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setThresholdLevelsHierarchically(
    char const* categoryNamePrefix,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);
----


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