ThrottlingMethods
The ThrottlingMethods
class contains one-liners for managing throttling rules.
These methods can be used in either Gloop or Groovy.
deleteThrottlingRule
The ThrottlingMethods.deleteThrottlingRule(String)
method is used to delete a throttling rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to delete |
Usage

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

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

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

getThrottlingRules
The ThrottlingMethods.getThrottlingRules(...)
method is used to get a list of all existing throttling rules.
There are several versions of this method that you can use:
MartiniMethods.getThrottlingRules()
MartiniMethods.getThrottlingRules(boolean)
MartiniMethods.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 ThrottlingMethods.getThrottlingRule(String)
method 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
