Package ai.promoted.delivery.client
Class PromotedDeliveryClient.Builder
java.lang.Object
ai.promoted.delivery.client.PromotedDeliveryClient.Builder
- Enclosing class:
PromotedDeliveryClient
Builds a
PromotedDeliveryClient.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds thePromotedDeliveryClient.withApiFactory(ApiFactory apiFactory) Sets API factory.withApplyTreatmentChecker(ApplyTreatmentChecker applyTreatmentChecker) Sets apply treatment checker.withBlockingShadowTraffic(boolean blockingShadowTraffic) Sets blockingShadowTraffic, which determines whether or not shadow traffic delivery is a blocking call.withDeliveryApiKey(String deliveryApiKey) Sets delivery api key.withDeliveryEndpoint(String deliveryEndpoint) Sets delivery endpoint.withDeliveryTimeoutMillis(long deliveryTimeoutMillis) Sets delivery timeout millis.withExecutor(Executor executor) Sets executor.withMaxRequestInsertions(int maxRequestInsertions) Sets max request insertions.withMetricsApiKey(String metricsApiKey) Sets metrics aoi key.withMetricsEndpoint(String metricsEndpoint) Sets metrics endpoint.withMetricsTimeoutMillis(long metricsTimoutMillis) Sets metrics timeout millis.withSampler(Sampler sampler) Sets sampler, which we use for sampling shadow traffic.withShadowTrafficDeliveryRate(float shadowTrafficDeliveryRate) Sets shadow traffic delivery rate.withWarmup(boolean warmup) Sets warmup, which will optionally prime the HTTPClient connection pool.witPerformChecks(boolean performChecks) Sets performChecks, which will optionally cause extra validations to occur on delivery requests.
-
Method Details
-
withDeliveryEndpoint
Sets delivery endpoint.- Parameters:
deliveryEndpoint- the delivery endpoint- Returns:
- the builder
-
withDeliveryApiKey
Sets delivery api key.- Parameters:
deliveryApiKey- the delivery api key- Returns:
- the builder
-
withDeliveryTimeoutMillis
Sets delivery timeout millis.- Parameters:
deliveryTimeoutMillis- the delivery timeout millis- Returns:
- the builder
-
withMetricsEndpoint
Sets metrics endpoint.- Parameters:
metricsEndpoint- the metrics endpoint- Returns:
- the builder
-
withMetricsApiKey
Sets metrics aoi key.- Parameters:
metricsApiKey- the metrics api key- Returns:
- the builder
-
withMetricsTimeoutMillis
Sets metrics timeout millis.- Parameters:
metricsTimoutMillis- the metrics timout millis- Returns:
- the builder
-
witPerformChecks
Sets performChecks, which will optionally cause extra validations to occur on delivery requests.- Parameters:
performChecks- the performChecks value- Returns:
- the builder
-
withBlockingShadowTraffic
Sets blockingShadowTraffic, which determines whether or not shadow traffic delivery is a blocking call.- Parameters:
blockingShadowTraffic- the blockingShadowTraffic value- Returns:
- the builder
-
withWarmup
Sets warmup, which will optionally prime the HTTPClient connection pool.- Parameters:
warmup- the warmup- Returns:
- the builder
-
withExecutor
Sets executor.- Parameters:
executor- the metrics executor- Returns:
- the builder
-
withApplyTreatmentChecker
public PromotedDeliveryClient.Builder withApplyTreatmentChecker(ApplyTreatmentChecker applyTreatmentChecker) Sets apply treatment checker.- Parameters:
applyTreatmentChecker- the apply treatment checker- Returns:
- the builder
-
withApiFactory
Sets API factory.- Parameters:
apiFactory- the API factory- Returns:
- the builder
-
withMaxRequestInsertions
Sets max request insertions.- Parameters:
maxRequestInsertions- the max request insertions- Returns:
- the builder
-
withShadowTrafficDeliveryRate
public PromotedDeliveryClient.Builder withShadowTrafficDeliveryRate(float shadowTrafficDeliveryRate) Sets shadow traffic delivery rate.- Parameters:
shadowTrafficDeliveryRate- the shadow traffic delivery rate- Returns:
- the builder
-
withSampler
Sets sampler, which we use for sampling shadow traffic.- Parameters:
sampler- the sampler- Returns:
- the builder
-
build
Builds thePromotedDeliveryClient.- Returns:
- the promoted delivery client
-