{ "setQueryCount", true, "bool", "set whether queries should be counted" },
{ "setQueryCountFilter", true, "func", "filter queries that would be counted, where `func` is a function with parameter `dq` which decides whether a query should and how it should be counted" },
{ "setRingBuffersLockRetries", true, "n", "set the number of attempts to get a non-blocking lock to a ringbuffer shard before blocking" },
- { "setRingBuffersSize", true, "n", "set the capacity of the ringbuffers used for live traffic inspection to `n`" },
+ { "setRingBuffersSize", true, "n [, numberOfShards]", "set the capacity of the ringbuffers used for live traffic inspection to `n`, and optionally the number of shards to use to `numberOfShards`" },
{ "setRules", true, "list of rules", "replace the current rules with the supplied list of pairs of DNS Rules and DNS Actions (see `newRuleAction()`)" },
{ "setServerPolicy", true, "policy", "set server selection policy to that policy" },
{ "setServerPolicyLua", true, "name, function", "set server selection policy to one named 'name' and provided by 'function'" },
Ringbuffers
~~~~~~~~~~~
-.. function:: setRingBuffersSize(num)
+.. function:: setRingBuffersLockRetries(num)
+ .. versionadded:: 1.3.0
+
+ Set the number of shards to attempt to lock without blocking before giving up and simply blocking while waiting for the next shard to be available
+
+ :param int num: The maximum number of attempts. Defaults to 5 if there are more than one shard, 0 otherwise.
+
+.. function:: setRingBuffersSize(num [, numberOfShards])
+ .. versionchanged:: 1.3.0
+ ``numberOfShards`` optional parameter added.
- Set the capacity of the ringbuffers used for live traffic inspection to ``num``
+ Set the capacity of the ringbuffers used for live traffic inspection to ``num``, and the number of shards to ``numberOfShards`` if specified.
:param int num: The maximum amount of queries to keep in the ringbuffer. Defaults to 10000
+ :param int numberOfShards: the number of shards to use to limit lock contention. Defaults to 1
Servers
-------