Class PromotedDeliveryClient.Builder

    • Method Detail

      • withDeliveryEndpoint

        public PromotedDeliveryClient.Builder withDeliveryEndpoint​(String deliveryEndpoint)
        Sets delivery endpoint.
        Parameters:
        deliveryEndpoint - the delivery endpoint
        Returns:
        the builder
      • withDeliveryApiKey

        public PromotedDeliveryClient.Builder withDeliveryApiKey​(String deliveryApiKey)
        Sets delivery api key.
        Parameters:
        deliveryApiKey - the delivery api key
        Returns:
        the builder
      • withDeliveryTimeoutMillis

        public PromotedDeliveryClient.Builder withDeliveryTimeoutMillis​(long deliveryTimeoutMillis)
        Sets delivery timeout millis.
        Parameters:
        deliveryTimeoutMillis - the delivery timeout millis
        Returns:
        the builder
      • withMetricsEndpoint

        public PromotedDeliveryClient.Builder withMetricsEndpoint​(String metricsEndpoint)
        Sets metrics endpoint.
        Parameters:
        metricsEndpoint - the metrics endpoint
        Returns:
        the builder
      • withMetricsApiKey

        public PromotedDeliveryClient.Builder withMetricsApiKey​(String metricsApiKey)
        Sets metrics aoi key.
        Parameters:
        metricsApiKey - the metrics api key
        Returns:
        the builder
      • withMetricsTimeoutMillis

        public PromotedDeliveryClient.Builder withMetricsTimeoutMillis​(long metricsTimoutMillis)
        Sets metrics timeout millis.
        Parameters:
        metricsTimoutMillis - the metrics timout millis
        Returns:
        the builder
      • witPerformChecks

        public PromotedDeliveryClient.Builder witPerformChecks​(boolean performChecks)
        Sets performChecks, which will optionally cause extra validations to occur on delivery requests.
        Parameters:
        performChecks - the performChecks value
        Returns:
        the builder
      • withBlockingShadowTraffic

        public PromotedDeliveryClient.Builder withBlockingShadowTraffic​(boolean blockingShadowTraffic)
        Sets blockingShadowTraffic, which determines whether or not shadow traffic delivery is a blocking call.
        Parameters:
        blockingShadowTraffic - the blockingShadowTraffic value
        Returns:
        the builder
      • withWarmup

        public PromotedDeliveryClient.Builder withWarmup​(boolean warmup)
        Sets warmup, which will optionally prime the HTTPClient connection pool.
        Parameters:
        warmup - the warmup
        Returns:
        the builder
      • withApplyTreatmentChecker

        public PromotedDeliveryClient.Builder withApplyTreatmentChecker​(ApplyTreatmentChecker applyTreatmentChecker)
        Sets apply treatment checker.
        Parameters:
        applyTreatmentChecker - the apply treatment checker
        Returns:
        the builder
      • withMaxRequestInsertions

        public PromotedDeliveryClient.Builder withMaxRequestInsertions​(int maxRequestInsertions)
        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

        public PromotedDeliveryClient.Builder withSampler​(Sampler sampler)
        Sets sampler, which we use for sampling shadow traffic.
        Parameters:
        sampler - the sampler
        Returns:
        the builder
      • withAcceptGzip

        public PromotedDeliveryClient.Builder withAcceptGzip​(boolean acceptGzip)
        Sets accept gzip encoding header. Defauls to true.
        Parameters:
        acceptGzip - accepts gzip
        Returns:
        the builder
      • withUseGrpc

        public PromotedDeliveryClient.Builder withUseGrpc​(boolean useGrpc)
        Whether to use gRPC instead of HTTP for delivery. Defauls to false.
        Parameters:
        useGrpc - uses gRPC
        Returns:
        the builder