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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlobalMetricsConfigurationBuilder
accurateSize(boolean accurateSize)
Enables accurate size computation for numberOfEntries statistics.ThreadPoolConfigurationBuilder
asyncThreadPool()
Configuration for the asynchronous operations thread poolThreadPoolConfigurationBuilder
blockingThreadPool()
Configuration for the blocking thread poolGlobalConfiguration
build()
Builds aGlobalConfiguration
object using the settings applied to this builderGlobalMetricsConfiguration
create()
Create the configuration beanGlobalConfigurationBuilder
defaultCacheName(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.ThreadPoolConfigurationBuilder
expirationThreadPool()
Configuration for the expiration thread poolboolean
gauges()
Are gauges enabled?GlobalMetricsConfigurationBuilder
gauges(boolean gauges)
Enables or disables gauges.protected GlobalConfigurationBuilder
getGlobalConfig()
GlobalStateConfigurationBuilder
globalState()
Global state configurationboolean
histograms()
Are histograms enabled?GlobalMetricsConfigurationBuilder
histograms(boolean histograms)
Enables or disables histograms.GlobalJmxConfigurationBuilder
jmx()
Global JMX configuration.ThreadPoolConfigurationBuilder
listenerThreadPool()
Configuration for the listener thread poolGlobalMetricsConfigurationBuilder
metrics()
Global microprofile metrics configuration.List<Builder<?>>
modules()
Global modules configurationboolean
namesAsTags()
Put the cache manager and cache name in tags rather then include them in the metric name.GlobalMetricsConfigurationBuilder
namesAsTags(boolean namesAsTags)
Put the cache manager and cache name in tags rather then include them in the metric name.ThreadPoolConfigurationBuilder
nonBlockingThreadPool()
Configuration for the non blocking thread poolThreadPoolConfigurationBuilder
persistenceThreadPool()
Configuration for the persistence thread poolString
prefix()
The global prefix to add to all metric names.GlobalMetricsConfigurationBuilder
prefix(String prefix)
The global prefix to add to all metric names.GlobalMetricsConfigurationBuilder
read(GlobalMetricsConfiguration template)
Reads the configuration from an already created configuration bean into this builder.GlobalSecurityConfigurationBuilder
security()
Security-related configurationSerializationConfigurationBuilder
serialization()
Global serialization (i.e.ShutdownConfigurationBuilder
shutdown()
Shutdown configurationSiteConfigurationBuilder
site()
Cross-site replication configurationThreadPoolConfigurationBuilder
stateTransferThreadPool()
Configuration for the state-transfer thread poolString
toString()
TransportConfigurationBuilder
transport()
Transport-related (i.e.-
Methods inherited from interface org.infinispan.configuration.global.GlobalConfigurationChildBuilder
globalJmxStatistics
-
-
-
-
Method Detail
-
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
public GlobalMetricsConfigurationBuilder gauges(boolean gauges)
Enables or disables gauges.
-
histograms
public boolean histograms()
Are histograms enabled?
-
histograms
public GlobalMetricsConfigurationBuilder histograms(boolean histograms)
Enables or disables histograms.
-
prefix
public String prefix()
The global prefix to add to all metric names.
-
prefix
public GlobalMetricsConfigurationBuilder prefix(String 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
public GlobalMetricsConfigurationBuilder namesAsTags(boolean namesAsTags)
Put the cache manager and cache name in tags rather then include them in the metric name.
-
accurateSize
public GlobalMetricsConfigurationBuilder accurateSize(boolean accurateSize)
Enables accurate size computation for numberOfEntries statistics. Note that this doesn't affect invocations of theCache.size()
method.
-
create
public GlobalMetricsConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<GlobalMetricsConfiguration>
- Returns:
-
read
public GlobalMetricsConfigurationBuilder read(GlobalMetricsConfiguration template)
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
public String toString()
-
getGlobalConfig
protected GlobalConfigurationBuilder getGlobalConfig()
-
transport
public TransportConfigurationBuilder transport()
Description copied from interface:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
metrics
public GlobalMetricsConfigurationBuilder metrics()
Description copied from interface:GlobalConfigurationChildBuilder
Global microprofile metrics configuration.- Specified by:
metrics
in interfaceGlobalConfigurationChildBuilder
-
jmx
public GlobalJmxConfigurationBuilder jmx()
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration.- Specified by:
jmx
in interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the state-transfer thread pool- Specified by:
stateTransferThreadPool
in interfaceGlobalConfigurationChildBuilder
-
blockingThreadPool
public ThreadPoolConfigurationBuilder blockingThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the blocking thread pool- Specified by:
blockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
nonBlockingThreadPool
public ThreadPoolConfigurationBuilder nonBlockingThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the non blocking thread pool- Specified by:
nonBlockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
public List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(String 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
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-
-