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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessagingRuleSampler
build()
MessagingRuleSampler.Builder
putAllRules(MessagingRuleSampler sampler)
Adds or replaces all rules in this sampler with those of the input.MessagingRuleSampler.Builder
putRule(Matcher matcher, Sampler sampler)
Adds or replaces the sampler for the matcher.
-
-
-
Method Detail
-
putAllRules
public MessagingRuleSampler.Builder putAllRules(MessagingRuleSampler sampler)
Adds or replaces all rules in this sampler with those of the input.- Since:
- 5.9
-
putRule
public MessagingRuleSampler.Builder putRule(Matcher matcher, Sampler sampler)
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
public MessagingRuleSampler build()
-
-