summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-06-02 18:19:13 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-06-07 18:57:36 -0500
commit110d7724675a496dd1c338e296e0c26d96156c3e (patch)
tree552b0b5a567479b50019c321a6355c17df9cf659 /include
parent610eee2a36d2d2426947784a230c31dca6b18c62 (diff)
sorcery: Add setting object type congestion levels.
Sorcery creates taskprocessors for object types to process object observer callbacks. An API call is needed to be able to set the congestion levels of these taskprocessors for selected object types. * Updated PJSIP's contact and contact_status sorcery object type observer default congestion levels based upon stress testing. Increased the congestion levels to reduce the potential for bursty register/unregister and subscribe/unsubscribe activity from triggering the taskprocessor overload alert. ASTERISK-26088 Reported by: Richard Mudgett Change-Id: I4542e83b556f0714009bfeff89505c801f1218c6
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/sorcery.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h
index 5e947257b..0cb434766 100644
--- a/include/asterisk/sorcery.h
+++ b/include/asterisk/sorcery.h
@@ -692,6 +692,20 @@ int __ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type,
__ast_sorcery_object_register((sorcery), (type), 1, 1, (alloc), (transform), (apply))
/*!
+ * \brief Set the high and low alert water marks of the sorcery object type.
+ * \since 13.10.0
+ *
+ * \param sorcery Pointer to a sorcery structure
+ * \param type Type of object
+ * \param low_water New queue low water mark. (-1 to set as 90% of high_water)
+ * \param high_water New queue high water mark.
+ *
+ * \retval 0 on success.
+ * \retval -1 on error (water marks not changed).
+ */
+int ast_sorcery_object_set_congestion_levels(struct ast_sorcery *sorcery, const char *type, long low_water, long high_water);
+
+/*!
* \brief Set the copy handler for an object type
*
* \param sorcery Pointer to a sorcery structure