public class MetricsSystemLoader extends Object
ServiceLoader
to instantiate a MetricsSystem
.Modifier and Type | Method and Description |
---|---|
static MetricsSystem |
load(MetricsSystemConfiguration<?> config)
Creates a
MetricsSystem instance using the corresponding MetricsSystemFactory
available to ServiceLoader on the classpath. |
public static MetricsSystem load(MetricsSystemConfiguration<?> config)
MetricsSystem
instance using the corresponding MetricsSystemFactory
available to ServiceLoader
on the classpath. If there is not exactly one instance of
a MetricsSystemFactory
, an instance of NoopMetricsSystem
will be returned.config
- State to pass to the MetricsSystemFactory
.MetricsSystem
implementation.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.