Package brave.rpc
Class RpcRuleSampler.Builder
- java.lang.Object
-
- brave.rpc.RpcRuleSampler.Builder
-
- Enclosing class:
- RpcRuleSampler
public static final class RpcRuleSampler.Builder extends Object
- Since:
- 5.8
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RpcRuleSampler
build()
RpcRuleSampler.Builder
putAllRules(RpcRuleSampler sampler)
Adds or replaces all rules in this sampler with those of the input.RpcRuleSampler.Builder
putRule(brave.sampler.Matcher matcher, brave.sampler.Sampler sampler)
Adds or replaces the sampler for the matcher.
-
-
-
Method Detail
-
putAllRules
public RpcRuleSampler.Builder putAllRules(RpcRuleSampler sampler)
Adds or replaces all rules in this sampler with those of the input.- Since:
- 5.8
-
putRule
public RpcRuleSampler.Builder putRule(brave.sampler.Matcher matcher, brave.sampler.Sampler sampler)
Adds or replaces the sampler for the matcher.Ex.
import static brave.rpc.RpcRequestMatchers.methodEquals; builder.putRule(methodEquals("Report"), RateLimitingSampler.create(10));
- Since:
- 5.8
-
build
public RpcRuleSampler build()
-
-