Class MetricsSystemLoader
java.lang.Object
org.apache.calcite.avatica.metrics.MetricsSystemLoader
A utility encapsulating use of
ServiceLoader to instantiate a MetricsSystem.-
Method Summary
Modifier and TypeMethodDescriptionstatic MetricsSystemload(MetricsSystemConfiguration<?> config) Creates aMetricsSysteminstance using the correspondingMetricsSystemFactoryavailable toServiceLoaderon the classpath.
-
Method Details
-
load
Creates aMetricsSysteminstance using the correspondingMetricsSystemFactoryavailable toServiceLoaderon the classpath. If there is not exactly one instance of aMetricsSystemFactory, an instance ofNoopMetricsSystemwill be returned.- Parameters:
config- State to pass to theMetricsSystemFactory.- Returns:
- A
MetricsSystemimplementation.
-