- java.lang.Object
-
- io.helidon.servicecommon.rest.HelidonRestServiceSupport.Builder<MetricsSupport,MetricsSupport.Builder>
-
- io.helidon.metrics.MetricsSupport.Builder
-
- All Implemented Interfaces:
Builder<MetricsSupport>
,MetricsSupport.Builder<MetricsSupport>
,Supplier<MetricsSupport>
- Enclosing class:
- MetricsSupport
public static class MetricsSupport.Builder extends HelidonRestServiceSupport.Builder<MetricsSupport,MetricsSupport.Builder> implements MetricsSupport.Builder<MetricsSupport>
A fluent API builder to build instances ofMetricsSupport
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MetricsSupport
build()
Returns the newMetricsSupport
instance according to the builder's settings.protected MetricsSupport
build(Function<MetricsSupport.Builder,MetricsSupport> factory)
MetricsSupport.Builder
config(Config config)
Deprecated, for removal: This API element is subject to removal in a future version.UsemetricsSettings(MetricsSettings.Builder)
insteadMetricsSupport.Builder
keyPerformanceIndicatorsMetricsConfig(Config kpiConfig)
Deprecated, for removal: This API element is subject to removal in a future version.MetricsSupport.Builder
keyPerformanceIndicatorsMetricsSettings(KeyPerformanceIndicatorMetricsSettings.Builder builder)
Deprecated, for removal: This API element is subject to removal in a future version.MetricsSupport.Builder
metricsSettings(MetricsSettings.Builder metricsSettingsBuilder)
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.MetricsSupport.Builder
registryFactory(RegistryFactory factory)
If you want to have multiple registry factories with different endpoints, you may create them usingRegistryFactory.create(MetricsSettings)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentHelidonRestServiceSupport.Builder.webContext(String)
contexts}.protected Config
webContextConfig(Config config)
-
Methods inherited from class io.helidon.servicecommon.rest.HelidonRestServiceSupport.Builder
config, crossOriginConfig, me, restServiceSettings, webContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.metrics.serviceapi.MetricsSupport.Builder
restServiceSettings
-
-
-
-
Method Detail
-
webContextConfig
protected Config webContextConfig(Config config)
- Overrides:
webContextConfig
in classHelidonRestServiceSupport.Builder<MetricsSupport,MetricsSupport.Builder>
-
build
public MetricsSupport build()
Description copied from interface:MetricsSupport.Builder
Returns the newMetricsSupport
instance according to the builder's settings.- Specified by:
build
in interfaceBuilder<MetricsSupport>
- Specified by:
build
in interfaceMetricsSupport.Builder<MetricsSupport>
- Returns:
- the new metrics support
-
build
protected MetricsSupport build(Function<MetricsSupport.Builder,MetricsSupport> factory)
-
config
@Deprecated(since="2.4.0", forRemoval=true) public MetricsSupport.Builder config(Config config)
Deprecated, for removal: This API element is subject to removal in a future version.UsemetricsSettings(MetricsSettings.Builder)
insteadOverride default configuration.- Overrides:
config
in classHelidonRestServiceSupport.Builder<MetricsSupport,MetricsSupport.Builder>
- Parameters:
config
- configuration instance- Returns:
- updated builder instance
- See Also:
Details about key performance metrics configuration
-
metricsSettings
public MetricsSupport.Builder metricsSettings(MetricsSettings.Builder metricsSettingsBuilder)
Description copied from interface:MetricsSupport.Builder
AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Specified by:
metricsSettings
in interfaceMetricsSupport.Builder<MetricsSupport>
- Parameters:
metricsSettingsBuilder
- the metrics settings to assign for use in building theMetricsSupport
instance- Returns:
- updated builder
-
registryFactory
public MetricsSupport.Builder registryFactory(RegistryFactory factory)
If you want to have multiple registry factories with different endpoints, you may create them usingRegistryFactory.create(MetricsSettings)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentHelidonRestServiceSupport.Builder.webContext(String)
contexts}.If this method is not called,
MetricsSupport
would use the shared instance as provided byRegistryFactory.getInstance(io.helidon.config.Config)
- Parameters:
factory
- factory to use in this metric support- Returns:
- updated builder instance
-
keyPerformanceIndicatorsMetricsSettings
@Deprecated(since="2.4.0", forRemoval=true) public MetricsSupport.Builder keyPerformanceIndicatorsMetricsSettings(KeyPerformanceIndicatorMetricsSettings.Builder builder)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the builder for KPI metrics settings, overriding any previously-assigned settings.- Parameters:
builder
- for the KPI metrics settings- Returns:
- updated builder instance
-
keyPerformanceIndicatorsMetricsConfig
@Deprecated(since="2.4.0", forRemoval=true) public MetricsSupport.Builder keyPerformanceIndicatorsMetricsConfig(Config kpiConfig)
Deprecated, for removal: This API element is subject to removal in a future version.Updates the KPI metrics config using the extended KPI metrics config node provided.- Parameters:
kpiConfig
- Config node containing extended KPI metrics config- Returns:
- updated builder instance
-
-