ThrottlingFunctions
The Throttling
class contains functions for managing throttling rules.
These functions can be used in either Gloop or Groovy.
deleteThrottlingRule
The ThrottlingFunctions.deleteThrottlingRule(String)
function is used to delete a throttling rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to delete |
Usage

saveThrottlingRule
The ThrottlingFunctions.saveThrottlingRule(ThrottlingRuleMetadata)
function is used to save a throttling rule.
Parameters
Property |
Type |
Description |
rule |
io.toro.martini.throttling.ThrottlingRuleMetadata |
Throttling rule to save |
Usage

disableThrottlingRule
The ThrottlingFunctions.disableThrottlingRule(String)
function is used to disable a throttling rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to disable |
Usage

enableThrottlingRule
The ThrottlingFunctions.enableThrottlingRule(String)
function is used to enable a throttling rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to enable |
Usage

getThrottlingRules
The ThrottlingFunctions.getThrottlingRules(...)
function is used to get a list of all existing throttling rules.
There are several versions of this function that you can use:
MartiniFunctions.getThrottlingRules()
MartiniFunctions.getThrottlingRules(boolean)
MartiniFunctions.getThrottlingRules(int, int, boolean)
Parameters
Property |
Type |
Description |
page |
java.lang.Integer |
Page number in pagination |
size |
java.lang.Integer |
The maximum number of throttling rules to return |
enabled |
java.lang.Boolean |
If true , it will get only throttling rules that are enabled |
Return value
Property |
Type |
Description |
throttlingRulesMetadata |
io.toro.martini.throttling.ThrottlingRuleMetadata[] |
Collection of throttling rule metadata |
Usage

getThrottlingRules
The ThrottlingFunctions.getThrottlingRule(String)
function is used to get a throttling rule by name.
Parameters
Property |
Type |
Description |
String |
java.lang.String |
The name of the throttling rule to get |
Return value
Property |
Type |
Description |
throttlingRuleMetadata |
io.toro.martini.throttling.ThrottlingRuleMetadata |
The throttling rule metadata |
Usage
