Class GlobalMetricsConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
org.infinispan.configuration.global.GlobalMetricsConfigurationBuilder
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<GlobalMetricsConfiguration>, GlobalConfigurationChildBuilder
public class GlobalMetricsConfigurationBuilder
extends AbstractGlobalConfigurationBuilder
implements org.infinispan.commons.configuration.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.org.infinispan.commons.configuration.attributes.AttributeSetcreate()booleanenabled()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()Deprecated, for removal: This API element is subject to removal in a future version.jvm(boolean jvm) Deprecated, for removal: This API element is subject to removal in a future version.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, org.infinispan.commons.configuration.Combine combine) toString()Methods inherited from class AbstractGlobalConfigurationBuilder
addModule, asyncThreadPool, blockingThreadPool, build, clearModules, defaultCacheName, expirationThreadPool, getGlobalConfig, globalState, jmx, listenerThreadPool, metrics, module, modules, nonBlockingThreadPool, persistenceThreadPool, security, serialization, shutdown, tracing, transportMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commons.configuration.Builder
read, reset, validate
-
Method Details
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()- Specified by:
attributesin interfaceorg.infinispan.commons.configuration.Builder<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
Deprecated, for removal: This API element is subject to removal in a future version.Whether JVM metrics should be reported. -
jvm
@Deprecated(forRemoval=true, since="16.0") public GlobalMetricsConfigurationBuilder jvm(boolean jvm) Deprecated, for removal: This API element is subject to removal in a future version.Whether JVM metrics should be reported. -
legacy
public boolean legacy()Whether legacy metrics should be reported. -
legacy
Whether legacy metrics should be reported. -
create
- Specified by:
createin interfaceorg.infinispan.commons.configuration.Builder<GlobalMetricsConfiguration>
-
read
public GlobalMetricsConfigurationBuilder read(GlobalMetricsConfiguration template, org.infinispan.commons.configuration.Combine combine) - Specified by:
readin interfaceorg.infinispan.commons.configuration.Builder<GlobalMetricsConfiguration>
-
toString
-