Class SolrReporter.Builder
- java.lang.Object
- 
- org.apache.solr.metrics.reporters.solr.SolrReporter.Builder
 
- 
- Enclosing class:
- SolrReporter
 
 public static class SolrReporter.Builder extends Object Builder for theSolrReporterclass.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SolrReporterbuild(org.apache.http.client.HttpClient client, Supplier<String> urlProvider)Deprecated.usebuild(SolrClientCache, Supplier)instead.SolrReporterbuild(SolrClientCache solrClientCache, Supplier<String> urlProvider)Build it.SolrReporter.BuildercloudClient(boolean cloudClient)If true then useCloudSolrClientfor communication.SolrReporter.BuilderconvertDurationsTo(TimeUnit durationUnit)Convert durations to the given time unit.SolrReporter.BuilderconvertRatesTo(TimeUnit rateUnit)Convert rates to the given time unit.static SolrReporter.BuilderforReports(SolrMetricManager metricManager, List<SolrReporter.Report> reports)Create a builder for SolrReporter.SolrReporter.BuildersetCompact(boolean compact)If true then use "compact" data representation.SolrReporter.BuilderskipAggregateValues(boolean skipAggregateValues)Individual values fromAggregateMetricmay not be worth to report.SolrReporter.BuilderskipHistograms(boolean skipHistograms)Histograms are difficult / impossible to aggregate, so it may not be worth to report them.SolrReporter.BuilderwithHandler(String handler)Handler name to use at the remote end.SolrReporter.BuilderwithReporterId(String reporterId)Use this id to identify metrics from this instance.SolrReporter.BuilderwithSolrParams(org.apache.solr.common.params.SolrParams params)AdditionalSolrParamsto add to every request.
 
- 
- 
- 
Method Detail- 
forReportspublic static SolrReporter.Builder forReports(SolrMetricManager metricManager, List<SolrReporter.Report> reports) Create a builder for SolrReporter.- Parameters:
- metricManager- metric manager that is the source of metrics
- reports- report definitions
- Returns:
- builder
 
 - 
withSolrParamspublic SolrReporter.Builder withSolrParams(org.apache.solr.common.params.SolrParams params) AdditionalSolrParamsto add to every request.- Parameters:
- params- additional params
- Returns:
- this
 
 - 
cloudClientpublic SolrReporter.Builder cloudClient(boolean cloudClient) If true then useCloudSolrClientfor communication. Default is false.- Parameters:
- cloudClient- use CloudSolrClient when true,- HttpSolrClientotherwise.
- Returns:
- this
 
 - 
setCompactpublic SolrReporter.Builder setCompact(boolean compact) If true then use "compact" data representation.- Parameters:
- compact- compact representation.
- Returns:
- this
 
 - 
skipHistogramspublic 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
 
 - 
skipAggregateValuespublic SolrReporter.Builder skipAggregateValues(boolean skipAggregateValues) Individual values fromAggregateMetricmay not be worth to report.- Parameters:
- skipAggregateValues- when tru then skip reporting individual values from the metric
- Returns:
- this
 
 - 
withHandlerpublic SolrReporter.Builder withHandler(String handler) Handler name to use at the remote end.- Parameters:
- handler- handler name, eg. "/admin/metricsCollector"
- Returns:
- this
 
 - 
withReporterIdpublic SolrReporter.Builder withReporterId(String reporterId) Use this id to identify metrics from this instance.- Parameters:
- reporterId- reporter id
- Returns:
- this
 
 - 
convertRatesTopublic SolrReporter.Builder convertRatesTo(TimeUnit rateUnit) Convert rates to the given time unit.- Parameters:
- rateUnit- a unit of time
- Returns:
- this
 
 - 
convertDurationsTopublic 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.usebuild(SolrClientCache, Supplier)instead.Build it.- Parameters:
- client- an instance of- HttpClientto 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
 
 - 
buildpublic SolrReporter build(SolrClientCache solrClientCache, Supplier<String> urlProvider) Build it.- Parameters:
- solrClientCache- an instance of- SolrClientCacheto 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
 
 
- 
 
-