Class GlobalMetricsConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.GlobalMetricsConfigurationBuilder
- All Implemented Interfaces:
Builder<GlobalMetricsConfiguration>
,GlobalConfigurationChildBuilder
public class GlobalMetricsConfigurationBuilder
extends Object
implements Builder<GlobalMetricsConfiguration>
Configures the types of metrics gathered and exported via microprofile 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 should be enabled manually when needed. Enabling metrics in config has no effect unless the necessary
microprofile metrics API and provider (SmallRye) jars are present in classpath.
-
Method Summary
Modifier and TypeMethodDescriptionaccurateSize
(boolean accurateSize) Enables accurate size computation for numberOfEntries statistics.Configuration for the asynchronous operations thread poolConfiguration for the blocking thread poolbuild()
Builds aGlobalConfiguration
object using the settings applied to this buildercreate()
Create the configuration beandefaultCacheName
(String defaultCacheName) Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
.boolean
enabled()
Metrics are enabled if at least one of the metric types is enabled.Configuration for the expiration thread poolboolean
gauges()
Are gauges enabled?gauges
(boolean gauges) Enables or disables gauges.protected GlobalConfigurationBuilder
Global state configurationboolean
Are histograms enabled?histograms
(boolean histograms) Enables or disables histograms.jmx()
Global JMX configuration.Configuration for the listener thread poolmetrics()
Global microprofile metrics configuration.modules()
Global modules configurationboolean
Put the cache manager and cache name in tags rather then include them in the metric name.namesAsTags
(boolean namesAsTags) Put the cache manager and cache name in tags rather then include them in the metric name.Configuration for the non blocking thread poolConfiguration for the persistence thread poolprefix()
The global prefix to add to all metric names.The global prefix to add to all metric names.read
(GlobalMetricsConfiguration template) Reads the configuration from an already created configuration bean into this builder.security()
Security-related configurationGlobal serialization (i.e.shutdown()
Shutdown configurationsite()
Cross-site replication configurationConfiguration for the state-transfer thread pooltoString()
Transport-related (i.e.Methods inherited from interface org.infinispan.configuration.global.GlobalConfigurationChildBuilder
globalJmxStatistics
-
Method Details
-
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
The global prefix to add to all metric names. -
prefix
The global prefix to add to all metric names. -
namesAsTags
public boolean namesAsTags()Put the cache manager and cache name in tags rather then include them in the metric name. -
namesAsTags
Put the cache manager and cache name in tags rather then include them in the metric name. -
accurateSize
Enables accurate size computation for numberOfEntries statistics. Note that this doesn't affect invocations of theCache.size()
method. -
create
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<GlobalMetricsConfiguration>
- Returns:
-
read
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<GlobalMetricsConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
toString
-
getGlobalConfig
-
transport
Description copied from interface:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
metrics
Description copied from interface:GlobalConfigurationChildBuilder
Global microprofile metrics configuration.- Specified by:
metrics
in interfaceGlobalConfigurationChildBuilder
-
jmx
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration.- Specified by:
jmx
in interfaceGlobalConfigurationChildBuilder
-
globalState
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the state-transfer thread pool- Specified by:
stateTransferThreadPool
in interfaceGlobalConfigurationChildBuilder
-
blockingThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the blocking thread pool- Specified by:
blockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
nonBlockingThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the non blocking thread pool- Specified by:
nonBlockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
Description copied from interface:GlobalConfigurationChildBuilder
Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
. Not- Specified by:
defaultCacheName
in interfaceGlobalConfigurationChildBuilder
-
build
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-