BloombergLP::ball::CategoryManager::setThresholdLevels

Set or create the named category with the specified threshold levels.

Synopsis

Declared in <ball_categorymanager.h>

Category*
setThresholdLevels(
    char const* categoryName,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);

Description

Set the threshold levels of the category having the specified categoryName, possibly changed by the registered category name filter callback, in the registry of this category manager to the specified recordLevel, passLevel, triggerLevel, and triggerAllLevel values, respectively, if a category having (the possibly filtered) categoryName exists and each of the specified threshold values is in the range [0 .. 255]. Otherwise, add to the registry a category having (the possibly filtered) categoryName and recordLevel, passLevel, triggerLevel, and triggerAllLevel threshold values, respectively, if there is no category having (the possibly filtered) categoryName and each of the specified threshold values is in the range [0 .. 255]. Return the address of the (possibly newly-created) modifiable category on success, and 0 otherwise (with no effect on any category). The behavior is undefined unless a lock is not held by this thread on the mutex returned by rulesetMutex.

Return Value

address of the (possibly newly-created) category on success, and 0 otherwise

Parameters

NameDescription
categoryNamename of the category to set or create
recordLevelrecord threshold level to set
passLevelpass threshold level to set
triggerLeveltrigger threshold level to set
triggerAllLeveltrigger-all threshold level to set