Class SolrReporter.Builder

    • Method Detail

      • cloudClient

        public SolrReporter.Builder cloudClient​(boolean cloudClient)
        If true then use CloudSolrClient for communication. Default is false.
        Parameters:
        cloudClient - use CloudSolrClient when true, HttpSolrClient otherwise.
        Returns:
        this
      • setCompact

        public SolrReporter.Builder setCompact​(boolean compact)
        If true then use "compact" data representation.
        Parameters:
        compact - compact representation.
        Returns:
        this
      • skipHistograms

        public SolrReporter.Builder skipHistograms​(boolean skipHistograms)
        Histograms are difficult / impossible to aggregate, so it may not be worth to report them.
        Parameters:
        skipHistograms - when true then skip histograms from reports
        Returns:
        this
      • skipAggregateValues

        public SolrReporter.Builder skipAggregateValues​(boolean skipAggregateValues)
        Individual values from AggregateMetric may not be worth to report.
        Parameters:
        skipAggregateValues - when tru then skip reporting individual values from the metric
        Returns:
        this
      • withHandler

        public SolrReporter.Builder withHandler​(String handler)
        Handler name to use at the remote end.
        Parameters:
        handler - handler name, eg. "/admin/metricsCollector"
        Returns:
        this
      • withReporterId

        public SolrReporter.Builder withReporterId​(String reporterId)
        Use this id to identify metrics from this instance.
        Parameters:
        reporterId - reporter id
        Returns:
        this
      • convertRatesTo

        public SolrReporter.Builder convertRatesTo​(TimeUnit rateUnit)
        Convert rates to the given time unit.
        Parameters:
        rateUnit - a unit of time
        Returns:
        this
      • convertDurationsTo

        public SolrReporter.Builder convertDurationsTo​(TimeUnit durationUnit)
        Convert durations to the given time unit.
        Parameters:
        durationUnit - a unit of time
        Returns:
        this
      • build

        @Deprecated
        public SolrReporter build​(org.apache.http.client.HttpClient client,
                                  Supplier<String> urlProvider)
        Deprecated.
        Build it.
        Parameters:
        client - an instance of HttpClient to be used for making calls.
        urlProvider - function that returns the base URL of Solr instance to target. May return null to indicate that reporting should be skipped. Note: this function will be called every time just before report is sent.
        Returns:
        configured instance of reporter
      • build

        public SolrReporter build​(SolrClientCache solrClientCache,
                                  Supplier<String> urlProvider)
        Build it.
        Parameters:
        solrClientCache - an instance of SolrClientCache to be used for making calls.
        urlProvider - function that returns the base URL of Solr instance to target. May return null to indicate that reporting should be skipped. Note: this function will be called every time just before report is sent.
        Returns:
        configured instance of reporter