Package com.lucidworks.cloud.api.solr
Interface SolrMetricsCollector
- All Known Implementing Classes:
SolrQueryMetrics
public interface SolrMetricsCollector
Interface which is implemented by different classes which will be used to capture the solr metrics.
One class which is deciding which collector to create is
SolrMetricsFactory
Creation of the connector automatically starting the internal timer, which resets with every collect call.-
Method Summary
Modifier and TypeMethodDescriptionvoidSave the response result of current calldefault voidMethod to store an communication exception class name as the response error.default voidMethod which should be called if call is successful.voidcollectWithTime(String metricError, long responseTimeMillis) Collect the metric with external timer value.
-
Method Details
-
collect
Save the response result of current call- Parameters:
responseError- - error which occurred during the response, Http status code or exception class name. In case of no error use "none".
-
collectOK
default void collectOK()Method which should be called if call is successful. -
collectError
Method to store an communication exception class name as the response error.- Parameters:
ex-
-
collectWithTime
Collect the metric with external timer value.- Parameters:
metricError-responseTimeMillis-
-