Class GlobalMetricsConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
org.infinispan.configuration.global.GlobalMetricsConfigurationBuilder
- All Implemented Interfaces:
Builder<GlobalMetricsConfiguration>,GlobalConfigurationChildBuilder
public class GlobalMetricsConfigurationBuilder
extends AbstractGlobalConfigurationBuilder
implements Builder<GlobalMetricsConfiguration>
Configures the types of metrics gathered and exported via Micrometer metrics for all caches owned by this Cache Manager.
Gauges do not have any performance penalty so are enabled by default.
Histograms are more expensive to compute so must be enabled manually.
Enabling metrics in configuration has no effect unless the necessary
Micrometer JAR is available on the classpath.
-
Method Summary
Modifier and TypeMethodDescriptionaccurateSize(boolean accurateSize) Enables accurate size computation for numberOfEntries statistics.create()Create the configuration beanbooleanenabled()Metrics are enabled if at least one of the metric types is enabled.booleangauges()Are gauges enabled?gauges(boolean gauges) Enables or disables gauges.booleanAre histograms enabled?histograms(boolean histograms) Enables or disables histograms.booleanjvm()Whether JVM metrics should be reported.jvm(boolean jvm) Whether JVM metrics should be reported.booleanlegacy()Whether legacy metrics should be reported.legacy(boolean legacy) Whether legacy metrics should be reported.booleanDeprecated, for removal: This API element is subject to removal in a future version.namesAsTags(boolean namesAsTags) Deprecated, for removal: This API element is subject to removal in a future version.prefix()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.read(GlobalMetricsConfiguration template, Combine combine) Reads the configuration from an already created configuration bean into this builder.toString()Methods inherited from class org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
addModule, asyncThreadPool, blockingThreadPool, build, clearModules, defaultCacheName, expirationThreadPool, getGlobalConfig, globalState, jmx, listenerThreadPool, metrics, module, modules, nonBlockingThreadPool, persistenceThreadPool, security, serialization, shutdown, tracing, transport
-
Method Details
-
attributes
- Specified by:
attributesin interfaceBuilder<GlobalMetricsConfiguration>
-
enabled
public boolean enabled()Metrics are enabled if at least one of the metric types is enabled. Seegauges(),histograms(). -
gauges
public boolean gauges()Are gauges enabled? -
gauges
Enables or disables gauges. -
histograms
public boolean histograms()Are histograms enabled? -
histograms
Enables or disables histograms. -
prefix
Deprecated, for removal: This API element is subject to removal in a future version.The global prefix to add to all metric names. -
prefix
@Deprecated(forRemoval=true, since="16.0") public GlobalMetricsConfigurationBuilder prefix(String prefix) Deprecated, for removal: This API element is subject to removal in a future version.The global prefix to add to all metric names. -
namesAsTags
Deprecated, for removal: This API element is subject to removal in a future version.Put the cache manager and cache name in tags rather than including them in the metric name. -
namesAsTags
@Deprecated(forRemoval=true, since="16.0") public GlobalMetricsConfigurationBuilder namesAsTags(boolean namesAsTags) Deprecated, for removal: This API element is subject to removal in a future version.Put the cache manager and cache name in tags rather than including them in the metric name. -
accurateSize
Enables accurate size computation for numberOfEntries statistics. Note that this doesn't affect invocations of theCache.size()method. -
jvm
public boolean jvm()Whether JVM metrics should be reported. -
jvm
Whether JVM metrics should be reported. -
legacy
public boolean legacy()Whether legacy metrics should be reported. -
legacy
Whether legacy metrics should be reported. -
create
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<GlobalMetricsConfiguration>- Returns:
-
read
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<GlobalMetricsConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.combine- the way attributes and children of this instance and the template should be combined.
-
toString
-