Package brave.messaging
Class MessagingRuleSampler.Builder
java.lang.Object
brave.messaging.MessagingRuleSampler.Builder
- Enclosing class:
- MessagingRuleSampler
public static final class MessagingRuleSampler.Builder extends Object
- Since:
- 5.9
-
Method Summary
Modifier and Type Method Description MessagingRuleSamplerbuild()MessagingRuleSampler.BuilderputAllRules(MessagingRuleSampler sampler)Adds or replaces all rules in this sampler with those of the input.MessagingRuleSampler.BuilderputRule(Matcher matcher, Sampler sampler)Adds or replaces the sampler for the matcher.
-
Method Details
-
putAllRules
Adds or replaces all rules in this sampler with those of the input.- Since:
- 5.9
-
putRule
Adds or replaces the sampler for the matcher.Ex.
import static brave.messaging.MessagingRequestMatchers.operationEquals; builder.putRule(operationEquals("Report"), RateLimitingSampler.create(10));- Since:
- 5.9
-
build
-