BloombergLP::ball::CategoryManager::setThresholdLevelsHierarchically

Set threshold levels for all categories matching a name prefix.

Synopsis

Declared in <ball_categorymanager.h>

int
setThresholdLevelsHierarchically(
    char const* categoryNamePrefix,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);

Description

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). In case categoryNamePrefix is empty update all categories with the threshold levels and delete all stored orphan hierarchical settings. In other words an empty category setting will never overwrite the defaults for future hierarchical categories. The behavior is undefined unless a lock is not held by this thread on the mutex returned by rulesetMutex. If any of the specified threshold levels is invalid, return a negative value.

Return Value

number of categories updated, or a negative value on error

Parameters

NameDescription
categoryNamePrefixname prefix of categories to update
recordLevelrecord threshold level to set
passLevelpass threshold level to set
triggerLeveltrigger threshold level to set
triggerAllLeveltrigger-all threshold level to set